From 80de8c93c9db262ca01d819b2515352e7f5cd965 Mon Sep 17 00:00:00 2001 From: vrana Date: Tue, 12 Jun 2012 10:49:42 -0700 Subject: [PATCH] Stabilize Thread-Topic Summary: NOTE: This can break current ongoing conversations. Test Plan: Commented on a revision and checked the header in the e-mail. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1340 Differential Revision: https://secure.phabricator.com/D2723 --- src/applications/differential/mail/DifferentialMail.php | 7 ++++++- .../maniphest/editor/ManiphestTransactionEditor.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/applications/differential/mail/DifferentialMail.php b/src/applications/differential/mail/DifferentialMail.php index 2f539caf50..4b607ae22f 100644 --- a/src/applications/differential/mail/DifferentialMail.php +++ b/src/applications/differential/mail/DifferentialMail.php @@ -96,7 +96,7 @@ abstract class DifferentialMail { ->setBody($body) ->setIsHTML($this->shouldMarkMailAsHTML()) ->setParentMessageID($this->parentMessageID) - ->addHeader('Thread-Topic', $this->getRevision()->getTitle()); + ->addHeader('Thread-Topic', $this->getThreadTopic()); $template->setAttachments($attachments); @@ -327,6 +327,11 @@ EOTEXT; return "differential-rev-{$phid}-req"; } + protected function getThreadTopic() { + $phid = $this->getRevision()->getPHID(); + return "Differential Revision {$phid}"; + } + public function setComment($comment) { $this->comment = $comment; return $this; diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php index 4876fb5849..d9307b3aa2 100644 --- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php +++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php @@ -278,7 +278,7 @@ final class ManiphestTransactionEditor { ->setVarySubjectPrefix("[{$action}]") ->setFrom($transaction->getAuthorPHID()) ->setParentMessageID($this->parentMessageID) - ->addHeader('Thread-Topic', 'Maniphest Task '.$task->getID()) + ->addHeader('Thread-Topic', 'Maniphest Task '.$task->getPHID()) ->setThreadID($thread_id, $is_create) ->setRelatedPHID($task->getPHID()) ->setIsBulk(true)