fix(GODT-2337): filter reply-to on draft.

This commit is contained in:
Romain LE JEUNE
2023-04-12 08:31:35 +02:00
parent 4e7a669260
commit 54b209f9e1
7 changed files with 93 additions and 19 deletions

View File

@ -441,7 +441,7 @@ func getMessageHeader(msg proton.Message, opts JobOptions) message.Header {
hdr.Set("From", msg.Sender.String())
}
if len(msg.ReplyTos) > 0 {
if len(msg.ReplyTos) > 0 && !msg.IsDraft() {
if !(len(msg.ReplyTos) == 1 && addressEmpty(msg.ReplyTos[0])) {
hdr.Set("Reply-To", toAddressList(msg.ReplyTos))
}