Add notification preference handling for chat and group posts - #1005
Merged
Merged
Conversation
tenkus47
commented
Sep 9, 2026
Member
- Integrated user notification preferences into chat and group post notification services, allowing for more granular control over notifications based on user settings.
- Implemented functions to filter users by their notification preferences, ensuring that only eligible users receive notifications.
- Updated relevant services and repositories to accommodate the new notification preference logic, enhancing the overall notification system.
- Added tests to verify the correct behavior of the new notification preference features, ensuring robustness and reliability.
- Integrated user notification preferences into chat and group post notification services, allowing for more granular control over notifications based on user settings. - Implemented functions to filter users by their notification preferences, ensuring that only eligible users receive notifications. - Updated relevant services and repositories to accommodate the new notification preference logic, enhancing the overall notification system. - Added tests to verify the correct behavior of the new notification preference features, ensuring robustness and reliability.
Contributor
Comment on lines
+68
to
+71
| NotificationType.EVENT, | ||
| NotificationType.EVENT_REMINDER, | ||
| NotificationType.ACCUMULATION, | ||
| NotificationType.SERIES, |
Contributor
There was a problem hiding this comment.
Exposed toggles remain unenforced
When a user disables or mutes EVENT_REMINDER, ACCUMULATION, or SERIES, the API persists and returns that setting, but the corresponding dispatch paths never consult these preferences. Notifications of those types therefore continue to be delivered despite the reported setting.
Prompt To Fix With AI
This is a comment left during a code review.
Path: pecha_api/notification/notification_preference_enums.py
Line: 68-71
Comment:
**Exposed toggles remain unenforced**
When a user disables or mutes `EVENT_REMINDER`, `ACCUMULATION`, or `SERIES`, the API persists and returns that setting, but the corresponding dispatch paths never consult these preferences. Notifications of those types therefore continue to be delivered despite the reported setting.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.- Updated the `get_bookmarks_service` to drop bookmarks for items that no longer exist or are not visible to the user, improving the user experience by preventing dangling entries. - Integrated notification preference filtering into event participant queries, ensuring that users only receive notifications they have opted into, particularly for event reminders and series notifications. - Added tests to verify the correct behavior of the updated bookmark service and notification preference logic, ensuring robustness and reliability in handling user preferences.
|
Tech-lo
approved these changes
Sep 9, 2026
Lungsangg
approved these changes
Sep 9, 2026
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.


