add per-agent notification preferences - #444
Draft
abhinavxd wants to merge 2 commits into
Draft
Conversation
Agents can now pick which notifications they get and on which channel. New page under Account > Notifications with an in-app / email toggle for each notification type. Preferences are stored in a new user_notification_preferences table. A missing row means enabled, so existing agents keep getting everything they got before. The dispatcher checks the recipient's opt-outs before sending. It does one batched query per dispatch instead of a lookup per recipient, so a mention that fans out to a whole team still costs a single query. If the lookup fails we suppress email and only send in-app, so a failed read never overrides someone's email opt-out. Also adds a new_reply notification type. When a customer replies to a conversation an agent owns, that agent gets notified. It only fires on the first reply of a waiting period, otherwise a burst of messages would send one notification each. Separately, OIDC login failures now redirect back to the login page with an error code instead of dumping a JSON error envelope in the browser. The login page maps the code to a message that says what went wrong and what to do about it. Added logs at each failure point in the OIDC flow since these were very hard to debug before. Agent emails are also lower-cased before lookup because providers can return a different casing than what we store, and a disabled account is now rejected.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… types per metric
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.
No description provided.