getRecipients drops incoming email To recipients from the reply CC
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Inizia da getRecipients e ispeziona il ramo in ingresso in cui viene assegnato emailAttributes.to. Aggiorna la gestione delle email in ingresso ed estendi il fixture createIncomingEmail o i relativi test con un indirizzo della posta in arrivo e un destinatario To aggiuntivo; il lavoro è completato quando il collega compare nel CC della risposta e l'indirizzo della posta in arrivo viene filtrato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
getRecipients builds the reply recipients from the last email in a conversation. For an incoming email, it is expected to move extra To recipients into the reply cc (minus the inbox address). It does not. The incoming branch hardcodes the To list to empty:
if (isIncoming) {
...
emailAttributes = {
cc: email?.cc || [],
bcc: email?.bcc || [],
from: email?.from || [],
to: [], // <-- drops the email's actual To recipients
};
}
So this later step is always a no-op for incoming emails:
// Only include 'to' recipients in cc for incoming emails, not for outgoing
if (Array.isArray(emailAttributes.to) && isIncoming) {
cc.push(...emailAttributes.to);
}
Effect in Chatwoot: a customer sends an email to the inbox with a colleague in the To line (not CC). The agent replies from the dashboard. The reply box computes an empty CC and the colleague silently falls off the thread.
Repro:
getRecipients(
incomingEmail({ from: ['[email protected]'], to: ['[email protected]', '[email protected]'] }),
'[email protected]',
'[email protected]',
''
);
// actual: cc = []
// expected: cc = ['[email protected]']
Regression: before #43 the function read the raw email object, so emailAttributes.to held the real To list and the cc.push worked. #43 restructured the branches and zeroed to for incoming; #50 kept the guard but the array is always empty. There is no test covering an incoming email with extra To recipients — the createIncomingEmail fixture has no to field at all.
Fix incoming: pass email?.to || [] so the existing cc-building step and filters work again.
- Lingua principale
- TypeScript
- Stelle
- 11
- Fork
- 14
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di chatwoot/utils
Tutte le issue di chatwoot/utils
Issue simili
-
Add: YRF Music NepalApertastreams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
walletbeat/walletbeat#1558 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hawk-digital-environments/HAWKI#438 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GiganticMinecraft/seichi-portal-frontend#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno