Gate WebSocket toast notifications by per-feature popup settings#919
Merged
Gate WebSocket toast notifications by per-feature popup settings#919
Conversation
The WebSocket handler called CreateAndShowBBSMentionToast and CreateAndShowMailMentionToast unconditionally, ignoring the user's BBSPopup/MessagePopup toggle. This made behavior differ from the polling fallback, which already checks UtilityEnabled() per type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c6fd5b9 to
f63b4d3
Compare
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.
What does this PR aim to accomplish?:
The WebSocket notification handler (
HandleNotificationMessage) dispatchesbbs_mentionandmail_mentiontoasts unconditionally, bypassing the user'sBBSPopup/MessagePopuptoggle settings. The polling fallback (PollNotifications) already gates each toast type withUtilityEnabled(), so behavior differs depending on connection state — users who disabled a notification type still receive those toasts over WebSocket.How does this PR accomplish the above?:
Wraps the
CreateAndShowBBSMentionToastandCreateAndShowMailMentionToastcalls inHandleNotificationMessagewithUtilityEnabled("BBSPopup")andUtilityEnabled("MessagePopup")checks respectively, matching the pattern used byPollNotifications.By submitting this pull request, I confirm the following:
git rebase)Summary by cubic
Gate WebSocket toast notifications by the user's popup settings so disabled types no longer show. bbs_mention now respects BBSPopup and mail_mention respects MessagePopup; version bumped to 3.2.2 (prerelease) and Update.json notes/time updated.
Written for commit c6fd5b9. Summary will update on new commits.