Repository navigation
Don't send new item notifications for items in private projects - #386
Open
sandervanhooft wants to merge 1 commit into
Open
sandervanhooft wants to merge 1 commit into
sandervanhooft wants to merge 1 commit into
Conversation
Items in a private project now only notify receivers that explicitly selected that project in the notification settings, matching how private items are already kept out of notifications.
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.
When an item is created,
ItemObserver::created()skips the new item notifications only when the item itself is private. It doesn't check the project. An item created in a private project still notifies every receiver in Settings → Notifications, unless that receiver is limited to other projects. So the title and content of an item in a private project can end up in a public Slack or Discord channel.This adds a project check to that loop. Items in a private project now notify only receivers that selected that project in their project list. Receivers without a project list are skipped, the same as for private items.
Why a receiver that selected the private project is still notified: an admin picked that project for that receiver on purpose, so it's most likely an internal channel for the project. If you'd rather private projects send nothing at all, like private items, it's a one-line change.
The English helper text for the project select now says so. Other locales keep their current text.
Tests