Reject notification settings without a verified email address - #832
Open
Jack-Edwards wants to merge 1 commit into
Open
Reject notification settings without a verified email address#832Jack-Edwards wants to merge 1 commit into
Jack-Edwards wants to merge 1 commit into
Conversation
Email is the only delivery channel for transfer notifications, so a user with no verified email address could enable notifications, see them persisted as enabled, and never receive anything. The client now keeps the toggles disabled until an address is verified, and reads the verified address out of the contact info changed event rather than the requested one. Those two fields carry the same value today, so this is not a visible fix on its own, but the flag now means what its name says before it starts gating the control. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Email is the only way we deliver transfer notifications, but nothing stopped a user without a verified email address from enabling them. The setting saved, read back as enabled, and no notification could ever arrive.
UpdateNotificationSettingsCommandnow returns a newMissingNotificationChannelerror when a request would enable notifications for a user with no verified email address. Turning notifications off is still allowed in that state, so nobody gets stuck. On the client, the toggles stay disabled until an address is verified.The component also read
RequestedEmailAddressfrom the contact info changed event where it wantedVerifiedEmailAddress. Both fields carry the same value today, so this changes nothing on its own, but the flag now gates the control and should mean what its name says.Notes for review:
UpdateNotificationSettingsErrorgains a member, and the endpoint returns 400 for it. Clients switching on that enum will see a value they did not before.Crypter.Core/Features/Transfer/Common.cschecks only the two flags, so those users still get a Hangfire job per received transfer. The job no-ops, and I left it alone as out of scope.