From b7503f05ce7356bb82af790e8b1f3bcba4ae3d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bellegarde?= Date: Fri, 6 Oct 2023 18:05:21 +0200 Subject: [PATCH] engine: If reply-to set, we have to honor it Fix #1105 --- src/engine/rfc822/rfc822-utils.vala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/engine/rfc822/rfc822-utils.vala b/src/engine/rfc822/rfc822-utils.vala index 65ab43a7..257d3994 100644 --- a/src/engine/rfc822/rfc822-utils.vala +++ b/src/engine/rfc822/rfc822-utils.vala @@ -27,12 +27,11 @@ namespace Geary.RFC822.Utils { Gee.List? sender_addresses = null) { var new_to = new Gee.ArrayList(); - // If we're replying to something we sent, send it to the same people we originally did. - // Otherwise, we'll send to the reply-to address or the from address. - if (email.to != null && email_is_from_sender(email, sender_addresses)) - new_to.add_all(email.to.get_all()); - else if (email.reply_to != null) + if (email.reply_to != null) new_to.add_all(email.reply_to.get_all()); + // If we're replying to something we sent, send it to the same people we originally did. + else if (email.to != null && email_is_from_sender(email, sender_addresses)) + new_to.add_all(email.to.get_all()); else if (email.from != null) new_to.add_all(email.from.get_all());