fix: include incoming email To recipients in the reply CC - #68
Open
limehawk wants to merge 1 commit into
Open
Conversation
The incoming branch of getRecipients hardcoded 'to: []'. The step that copies extra To recipients into the reply CC always received an empty array. Recipients the sender addressed in To, rather than CC, fell off the thread on reply. Pass the email's actual To list. The existing filters still remove the inbox address, the forward-to address, and the contact.
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.
Fixes #67
getRecipientshardcodesto: []in the incoming branch, so the step that copies an incoming email's extra To recipients into the replyccalways receives an empty array. Anyone the sender addressed in To (rather than CC) falls off the thread when an agent replies.Change: pass the email's actual To list (
to: email?.to || []). The existing downstream logic already does the rest: To recipients are only merged intoccfor incoming emails, and the filters remove the inbox address, the forward-to address, and the contact. This restores the behavior from before #43.Tests: added a
To Recipientsblock for incoming emails (extra To recipient lands incc, inbox address is filtered, works alongside existingcc,to: nullis safe) and added the missingtofield to the incoming fixture. Full suite:email.test.tspasses; the only failures are 3 pre-existing ones indate.test.ts, also failing onmainunmodified.