Repository navigation
fix(notifications): personal webhooks ignore the email switch and include your own changes - #3955
Merged
Merged
Conversation
…lude your own changes Personal webhooks only went to users with "Receive email notifications" on, so a user who moved their notifications to a webhook and switched email off got nothing. The author of a change was also left out, so testing a webhook with your own edits never fired it. Webhook recipients now come from the active team plus the author, filtered by the same relevance, category, mention and collaborator rules as email. The email switch governs email only, at queue time and at delivery time. The webhook help text says so in every language, and the checkbox label now says "email" where translations had dropped it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DqVeL6FWt71mr3sFBw3eSQ
marcelfolaron
requested review from
broskees
and
a balanced review from Copilot
and removed request for
a team
October 20, 2026 16:40
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The collaborator bypass re-adds authors despite their project mute or category opt-out.
1 open issue
What changed in this PR
This PR separates Leantime’s personal webhooks from email preferences and includes authors’ own changes.
Changes:
- Separates webhook and email recipient selection while sharing preference loading.
- Updates delivery and regression tests for email opt-out and author notifications.
- Clarifies webhook help across 44 languages and email labels in 18 translations.
| File | Description |
|---|---|
| tests/Unit/app/Domain/Projects/Services/ProjectsServiceTest.php | Tests recipient selection and author delivery. |
| tests/Unit/app/Domain/Notifications/Services/WebhooksServiceTest.php | Updates email opt-out expectations. |
| tests/Unit/app/Domain/Notifications/Services/WebhookRevocationTest.php | Verifies email opt-out preserves delivery. |
| app/Language/zh-TW.ini | Clarifies webhook help and email label. |
| app/Language/zh-CN.ini | Clarifies webhook help and email label. |
| app/Language/vi-VN.ini | Updates webhook help. |
| app/Language/uk-UA.ini | Clarifies webhook help and email label. |
| app/Language/tr-TR.ini | Updates webhook help. |
| app/Language/sv-SE.ini | Updates webhook help. |
| app/Language/sr-SP.ini | Updates webhook help. |
| app/Language/sl-SI.ini | Updates webhook help. |
| app/Language/sk-SK.ini | Updates webhook help. |
| app/Language/ru-RU.ini | Clarifies webhook help and email label. |
| app/Language/ro-RO.ini | Updates webhook help. |
| app/Language/pt-PT.ini | Clarifies webhook help and email label. |
| app/Language/pt-BR.ini | Clarifies webhook help and email label. |
| app/Language/pl-PL.ini | Updates webhook help. |
| app/Language/no-NO.ini | Updates webhook help. |
| app/Language/nl-NL.ini | Clarifies webhook help and email label. |
| app/Language/lv-LV.ini | Updates webhook help. |
| app/Language/ks-IN.ini | Updates webhook help. |
| app/Language/ko-KR.ini | Updates webhook help. |
| app/Language/km-KH.ini | Updates webhook help. |
| app/Language/kaa.ini | Updates webhook help. |
| app/Language/ja-JP.ini | Clarifies webhook help and email label. |
| app/Language/it-IT.ini | Clarifies webhook help and email label. |
| app/Language/is-IS.ini | Updates webhook help. |
| app/Language/id-ID.ini | Updates webhook help. |
| app/Language/hu-HU.ini | Updates webhook help. |
| app/Language/hr-HR.ini | Updates webhook help. |
| app/Language/he-IL.ini | Clarifies webhook help and email label. |
| app/Language/fr-FR.ini | Clarifies webhook help and email label. |
| app/Language/fr-CH.ini | Clarifies webhook help and email label. |
| app/Language/fa-IR.ini | Updates webhook help. |
| app/Language/et-EE.ini | Updates webhook help. |
| app/Language/es-MX.ini | Updates webhook help. |
| app/Language/es-ES.ini | Clarifies webhook help and email label. |
| app/Language/es-419.ini | Updates webhook help. |
| app/Language/en-US.ini | Updates webhook help. |
| app/Language/en-GB.ini | Clarifies webhook help and email label. |
| app/Language/el-GR.ini | Updates webhook help. |
| app/Language/de-DE.ini | Clarifies webhook help and email label. |
| app/Language/de-DE-inf.ini | Clarifies webhook help and email label. |
| app/Language/de-CH.ini | Clarifies webhook help and email label. |
| app/Language/da-DK.ini | Clarifies webhook help and email label. |
| app/Language/cs-CZ.ini | Updates webhook help. |
| app/Language/ar-SA.ini | Updates webhook help. |
| app/Domain/Projects/Services/Projects.php | Separates webhook candidates from email recipients. |
| app/Domain/Notifications/Services/Webhooks.php | Removes email preference from delivery eligibility. |
Review effort: Balanced
…ebhook filters The collaborator and mention bypasses were given no author, so an author who collaborates on the to-do came back after their project mute or category opt-out removed them. Pass the real author: they are a webhook candidate already, and other collaborators keep the bypass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DqVeL6FWt71mr3sFBw3eSQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
A customer on cloud set up a personal webhook (Profile → Webhooks) and saw nothing arrive. Two rules in the recipient selection could each cause that:
Projects::getUsersToNotify) and the delivery check (Webhooks::mayReceiveProjectNotifications) requiredzp_user.notifications = 1. In the UI that field is "Receive email notifications". So anyone who moved their notifications to a webhook and unticked email got nothing, with no message.notifyProjectUsersdrops the author before anything is queued. That is right for email, but it means testing a webhook by making changes yourself never fires it. An integration that keeps a record of your work also misses everything you do.What changes
Projects::personalWebhookCandidates()). They then go through the same relevance, category, mention and collaborator rules as email. Muting a project or switching off a category still stops the webhook, including for your own changes.Webhooks::mayReceiveProjectNotificationsno longer checks the email switch. It still checks that the account exists and is active and that the user has project access.Testing
ProjectsServiceTest:Not verified on cloud: I couldn't read the customer's tenant, so I don't know which of the two rules hit them. Both are fixed here.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DqVeL6FWt71mr3sFBw3eSQ