mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Include both the Gmail and "natural" Message-IDs in the "References" header
Summary: See T251, where gregprice correctly argues that we need both: None of the other people on the thread will have seen that message, so it seems like a lot of clients would put the server's message in a new thread. In general, I think you want the References: header to mention every ancestor message in the thread that you know about, because that's how MUAs keep a thread together in the face of missing some of its messages. Test Plan: Sent a reply email locally, got a response with both Message-IDs in "references". Reviewed By: rm Reviewers: gregprice, rm Commenters: gregprice CC: aran, gregprice, epriestley, rm Differential Revision: 499
This commit is contained in:
parent
e5bb756b51
commit
c915a064a9
1 changed files with 6 additions and 1 deletions
|
@ -298,12 +298,17 @@ class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
|
|||
$mailer->addHeader('Message-ID', $value);
|
||||
} else {
|
||||
$in_reply_to = $value;
|
||||
$references = array($value);
|
||||
$parent_id = $this->getParentMessageID();
|
||||
if ($parent_id) {
|
||||
$in_reply_to = $parent_id;
|
||||
// By RFC 2822, the most immediate parent should appear last
|
||||
// in the "References" header, so this order is intentional.
|
||||
$references[] = $parent_id;
|
||||
}
|
||||
$references = implode(' ', $references);
|
||||
$mailer->addHeader('In-Reply-To', $in_reply_to);
|
||||
$mailer->addHeader('References', $in_reply_to);
|
||||
$mailer->addHeader('References', $references);
|
||||
}
|
||||
$thread_index = $this->generateThreadIndex($value, $is_first);
|
||||
$mailer->addHeader('Thread-Index', $thread_index);
|
||||
|
|
Loading…
Reference in a new issue