Page MenuHomePhabricator

D19012.id45608.diff
No OneTemporary

D19012.id45608.diff

diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php
--- a/src/applications/audit/editor/PhabricatorAuditEditor.php
+++ b/src/applications/audit/editor/PhabricatorAuditEditor.php
@@ -473,17 +473,14 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$identifier = $object->getCommitIdentifier();
$repository = $object->getRepository();
- $monogram = $repository->getMonogram();
$summary = $object->getSummary();
$name = $repository->formatCommitName($identifier);
$subject = "{$name}: {$summary}";
- $thread_topic = "Commit {$monogram}{$identifier}";
$template = id(new PhabricatorMetaMTAMail())
- ->setSubject($subject)
- ->addHeader('Thread-Topic', $thread_topic);
+ ->setSubject($subject);
$this->attachPatch(
$template,
diff --git a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
--- a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
+++ b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
@@ -255,11 +255,9 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID();
$name = $object->getName();
- $phid = $object->getPHID();
$mail = id(new PhabricatorMetaMTAMail())
- ->setSubject(pht('SSH Key %d: %s', $id, $name))
- ->addHeader('Thread-Topic', $phid);
+ ->setSubject(pht('SSH Key %d: %s', $id, $name));
// The primary value of this mail is alerting users to account compromises,
// so force delivery. In particular, this mail should still be delivered
diff --git a/src/applications/badges/editor/PhabricatorBadgesEditor.php b/src/applications/badges/editor/PhabricatorBadgesEditor.php
--- a/src/applications/badges/editor/PhabricatorBadgesEditor.php
+++ b/src/applications/badges/editor/PhabricatorBadgesEditor.php
@@ -87,12 +87,10 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$name = $object->getName();
$id = $object->getID();
- $topic = pht('Badge %d', $id);
$subject = pht('Badge %d: %s', $id, $name);
return id(new PhabricatorMetaMTAMail())
- ->setSubject($subject)
- ->addHeader('Thread-Topic', $topic);
+ ->setSubject($subject);
}
protected function getMailTo(PhabricatorLiskDAO $object) {
diff --git a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
--- a/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarEventEditor.php
@@ -309,13 +309,11 @@
}
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
- $id = $object->getID();
$name = $object->getName();
$monogram = $object->getMonogram();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("{$monogram}: {$name}")
- ->addHeader('Thread-Topic', $monogram);
+ ->setSubject("{$monogram}: {$name}");
}
protected function buildMailBody(
diff --git a/src/applications/conpherence/editor/ConpherenceEditor.php b/src/applications/conpherence/editor/ConpherenceEditor.php
--- a/src/applications/conpherence/editor/ConpherenceEditor.php
+++ b/src/applications/conpherence/editor/ConpherenceEditor.php
@@ -227,11 +227,9 @@
'%s sent you a message.',
$this->getActor()->getUserName());
}
- $phid = $object->getPHID();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("Z{$id}: {$title}")
- ->addHeader('Thread-Topic', "Z{$id}: {$phid}");
+ ->setSubject("Z{$id}: {$title}");
}
protected function getMailTo(PhabricatorLiskDAO $object) {
diff --git a/src/applications/countdown/editor/PhabricatorCountdownEditor.php b/src/applications/countdown/editor/PhabricatorCountdownEditor.php
--- a/src/applications/countdown/editor/PhabricatorCountdownEditor.php
+++ b/src/applications/countdown/editor/PhabricatorCountdownEditor.php
@@ -45,8 +45,7 @@
$name = $object->getTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("{$monogram}: {$name}")
- ->addHeader('Thread-Topic', $monogram);
+ ->setSubject("{$monogram}: {$name}");
}
protected function buildMailBody(
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -689,15 +689,10 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID();
$title = $object->getTitle();
-
- $original_title = $object->getOriginalTitle();
-
$subject = "D{$id}: {$title}";
- $thread_topic = "D{$id}: {$original_title}";
return id(new PhabricatorMetaMTAMail())
- ->setSubject($subject)
- ->addHeader('Thread-Topic', $thread_topic);
+ ->setSubject($subject);
}
protected function getTransactionsForMail(
diff --git a/src/applications/files/editor/PhabricatorFileEditor.php b/src/applications/files/editor/PhabricatorFileEditor.php
--- a/src/applications/files/editor/PhabricatorFileEditor.php
+++ b/src/applications/files/editor/PhabricatorFileEditor.php
@@ -47,8 +47,7 @@
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("F{$id}: {$name}")
- ->addHeader('Thread-Topic', "F{$id}");
+ ->setSubject("F{$id}: {$name}");
}
protected function buildMailBody(
diff --git a/src/applications/fund/editor/FundInitiativeEditor.php b/src/applications/fund/editor/FundInitiativeEditor.php
--- a/src/applications/fund/editor/FundInitiativeEditor.php
+++ b/src/applications/fund/editor/FundInitiativeEditor.php
@@ -50,8 +50,7 @@
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("{$monogram}: {$name}")
- ->addHeader('Thread-Topic', $monogram);
+ ->setSubject("{$monogram}: {$name}");
}
protected function buildMailBody(
diff --git a/src/applications/legalpad/editor/LegalpadDocumentEditor.php b/src/applications/legalpad/editor/LegalpadDocumentEditor.php
--- a/src/applications/legalpad/editor/LegalpadDocumentEditor.php
+++ b/src/applications/legalpad/editor/LegalpadDocumentEditor.php
@@ -124,12 +124,10 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID();
- $phid = $object->getPHID();
$title = $object->getDocumentBody()->getTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("L{$id}: {$title}")
- ->addHeader('Thread-Topic', "L{$id}: {$phid}");
+ ->setSubject("L{$id}: {$title}");
}
protected function getMailTo(PhabricatorLiskDAO $object) {
diff --git a/src/applications/macro/editor/PhabricatorMacroEditor.php b/src/applications/macro/editor/PhabricatorMacroEditor.php
--- a/src/applications/macro/editor/PhabricatorMacroEditor.php
+++ b/src/applications/macro/editor/PhabricatorMacroEditor.php
@@ -35,8 +35,7 @@
$name = 'Image Macro "'.$name.'"';
return id(new PhabricatorMetaMTAMail())
- ->setSubject($name)
- ->addHeader('Thread-Topic', $name);
+ ->setSubject($name);
}
protected function getMailTo(PhabricatorLiskDAO $object) {
diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
--- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php
+++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
@@ -206,8 +206,7 @@
$title = $object->getTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("T{$id}: {$title}")
- ->addHeader('Thread-Topic', "T{$id}: ".$object->getOriginalTitle());
+ ->setSubject("T{$id}: {$title}");
}
protected function buildMailBody(
diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php
--- a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php
+++ b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php
@@ -1262,6 +1262,11 @@
$headers[] = array('X-Phabricator-Must-Encrypt', 'Yes');
}
+ $related_phid = $this->getRelatedPHID();
+ if ($related_phid) {
+ $headers[] = array('Thread-Topic', $related_phid);
+ }
+
return $headers;
}
@@ -1309,6 +1314,7 @@
'Precedence',
'References',
'Thread-Index',
+ 'Thread-Topic',
'X-Mail-Transport-Agent',
'X-Auto-Response-Suppress',
diff --git a/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php b/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php
--- a/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php
+++ b/src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php
@@ -46,12 +46,10 @@
}
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
- $id = $object->getID();
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject($name)
- ->addHeader('Thread-Topic', $object->getPHID());
+ ->setSubject($name);
}
protected function buildMailBody(
diff --git a/src/applications/paste/editor/PhabricatorPasteEditor.php b/src/applications/paste/editor/PhabricatorPasteEditor.php
--- a/src/applications/paste/editor/PhabricatorPasteEditor.php
+++ b/src/applications/paste/editor/PhabricatorPasteEditor.php
@@ -72,8 +72,7 @@
$name = $object->getTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("P{$id}: {$name}")
- ->addHeader('Thread-Topic', "P{$id}");
+ ->setSubject("P{$id}: {$name}");
}
protected function buildMailBody(
diff --git a/src/applications/phame/editor/PhameBlogEditor.php b/src/applications/phame/editor/PhameBlogEditor.php
--- a/src/applications/phame/editor/PhameBlogEditor.php
+++ b/src/applications/phame/editor/PhameBlogEditor.php
@@ -48,12 +48,10 @@
}
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
- $phid = $object->getPHID();
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject($name)
- ->addHeader('Thread-Topic', $phid);
+ ->setSubject($name);
}
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
diff --git a/src/applications/phame/editor/PhamePostEditor.php b/src/applications/phame/editor/PhamePostEditor.php
--- a/src/applications/phame/editor/PhamePostEditor.php
+++ b/src/applications/phame/editor/PhamePostEditor.php
@@ -61,12 +61,10 @@
}
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
- $phid = $object->getPHID();
$title = $object->getTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject($title)
- ->addHeader('Thread-Topic', $phid);
+ ->setSubject($title);
}
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
diff --git a/src/applications/pholio/editor/PholioMockEditor.php b/src/applications/pholio/editor/PholioMockEditor.php
--- a/src/applications/pholio/editor/PholioMockEditor.php
+++ b/src/applications/pholio/editor/PholioMockEditor.php
@@ -112,11 +112,9 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID();
$name = $object->getName();
- $original_name = $object->getOriginalName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("M{$id}: {$name}")
- ->addHeader('Thread-Topic', "M{$id}: {$original_name}");
+ ->setSubject("M{$id}: {$name}");
}
protected function getMailTo(PhabricatorLiskDAO $object) {
diff --git a/src/applications/phortune/editor/PhortuneCartEditor.php b/src/applications/phortune/editor/PhortuneCartEditor.php
--- a/src/applications/phortune/editor/PhortuneCartEditor.php
+++ b/src/applications/phortune/editor/PhortuneCartEditor.php
@@ -123,8 +123,7 @@
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject(pht('Order %d: %s', $id, $name))
- ->addHeader('Thread-Topic', pht('Order %s', $id));
+ ->setSubject(pht('Order %d: %s', $id, $name));
}
protected function buildMailBody(
diff --git a/src/applications/phriction/editor/PhrictionTransactionEditor.php b/src/applications/phriction/editor/PhrictionTransactionEditor.php
--- a/src/applications/phriction/editor/PhrictionTransactionEditor.php
+++ b/src/applications/phriction/editor/PhrictionTransactionEditor.php
@@ -299,12 +299,10 @@
}
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
- $id = $object->getID();
$title = $object->getContent()->getTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject($title)
- ->addHeader('Thread-Topic', $object->getPHID());
+ ->setSubject($title);
}
protected function buildMailBody(
diff --git a/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php b/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
--- a/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
+++ b/src/applications/phurl/editor/PhabricatorPhurlURLEditor.php
@@ -68,8 +68,7 @@
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("U{$id}: {$name}")
- ->addHeader('Thread-Topic', "U{$id}: ".$object->getName());
+ ->setSubject("U{$id}: {$name}");
}
protected function buildMailBody(
diff --git a/src/applications/ponder/editor/PonderAnswerEditor.php b/src/applications/ponder/editor/PonderAnswerEditor.php
--- a/src/applications/ponder/editor/PonderAnswerEditor.php
+++ b/src/applications/ponder/editor/PonderAnswerEditor.php
@@ -57,8 +57,7 @@
$id = $object->getID();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("ANSR{$id}")
- ->addHeader('Thread-Topic', "ANSR{$id}");
+ ->setSubject("ANSR{$id}");
}
protected function buildMailBody(
diff --git a/src/applications/ponder/editor/PonderQuestionEditor.php b/src/applications/ponder/editor/PonderQuestionEditor.php
--- a/src/applications/ponder/editor/PonderQuestionEditor.php
+++ b/src/applications/ponder/editor/PonderQuestionEditor.php
@@ -146,11 +146,9 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID();
$title = $object->getTitle();
- $original_title = $object->getOriginalTitle();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("Q{$id}: {$title}")
- ->addHeader('Thread-Topic', "Q{$id}: {$original_title}");
+ ->setSubject("Q{$id}: {$title}");
}
protected function buildMailBody(
diff --git a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
--- a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
+++ b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
@@ -219,12 +219,10 @@
}
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
- $id = $object->getID();
$name = $object->getName();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("{$name}")
- ->addHeader('Thread-Topic', "Project {$id}");
+ ->setSubject("{$name}");
}
protected function buildMailBody(
diff --git a/src/applications/releeph/editor/ReleephRequestTransactionalEditor.php b/src/applications/releeph/editor/ReleephRequestTransactionalEditor.php
--- a/src/applications/releeph/editor/ReleephRequestTransactionalEditor.php
+++ b/src/applications/releeph/editor/ReleephRequestTransactionalEditor.php
@@ -196,11 +196,9 @@
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID();
- $phid = $object->getPHID();
$title = $object->getSummaryForDisplay();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("RQ{$id}: {$title}")
- ->addHeader('Thread-Topic', "RQ{$id}: {$phid}");
+ ->setSubject("RQ{$id}: {$title}");
}
protected function getMailTo(PhabricatorLiskDAO $object) {
diff --git a/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php b/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php
--- a/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php
+++ b/src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php
@@ -124,7 +124,6 @@
->setFrom($event->getPusherPHID())
->setBody($body->render())
->setThreadID($event->getPHID(), $is_new = true)
- ->addHeader('Thread-Topic', $subject)
->setIsBulk(true);
return $target->willSendMail($mail);
diff --git a/src/applications/slowvote/editor/PhabricatorSlowvoteEditor.php b/src/applications/slowvote/editor/PhabricatorSlowvoteEditor.php
--- a/src/applications/slowvote/editor/PhabricatorSlowvoteEditor.php
+++ b/src/applications/slowvote/editor/PhabricatorSlowvoteEditor.php
@@ -48,8 +48,7 @@
$name = $object->getQuestion();
return id(new PhabricatorMetaMTAMail())
- ->setSubject("{$monogram}: {$name}")
- ->addHeader('Thread-Topic', $monogram);
+ ->setSubject("{$monogram}: {$name}");
}
protected function buildMailBody(

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 5, 1:54 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6751063
Default Alt Text
D19012.id45608.diff (17 KB)

Event Timeline