fix: reply-all no longer CCs your own send-as alias#6
Closed
drebaglioni wants to merge 2 commits into
Closed
Conversation
When reply-all is used on an email addressed to a send-as alias, extractReplyInfo doesn't know the alias belongs to the current user and includes it in the CC list. The user ends up CC'ing themselves. Filter the selected From address out of CC in buildSendOptions, where both values are known. Other aliases are left alone since they may be intentional recipients (e.g. emailing yourself at a different alias).
Move the from-alias CC filtering from buildSendOptions (send-time) to a useEffect on `from` changes. This fixes: - CC chips in the UI showing the user's own alias during compose - hasAnyRecipient guards using unfiltered cc (Devin review) - Undo-send restoring the alias back into CC (Greptile review)
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.
Summary
Cherry-picks upstream ankitvgupta/mail-app#91 by @buzali.
When reply-all is used on an email addressed to one of your send-as aliases,
extractReplyInfodoesn't know the alias belongs to you and includes it in CC — you end up CC'ing yourself. This filters the selected From alias out of CC at state-level (viauseEffectonfrom) so:hasAnyRecipientguards see the correct filtered CCOther aliases are intentionally left alone (you may want to send yourself at a different alias).
Changes
src/renderer/hooks/useComposeForm.ts— +12 lines, oneuseEffectthat strips the currentfromalias fromcc.Test plan
Notes
archive-ready.spec.ts,calendaring-agent.spec.ts, andemail-analyzer.spec.ts— unrelated to this change. Worth triaging separately.npx tsc --noEmit✅npm run lint✅