Page MenuHomePhabricator

D8303.diff
No OneTemporary

D8303.diff

Index: src/applications/differential/editor/DifferentialTransactionEditor.php
===================================================================
--- src/applications/differential/editor/DifferentialTransactionEditor.php
+++ src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -107,6 +107,57 @@
return parent::requireCapabilities($object, $xaction);
}
+ protected function shouldSendMail(
+ PhabricatorLiskDAO $object,
+ array $xactions) {
+ return true;
+ }
+
+ protected function getMailTo(PhabricatorLiskDAO $object) {
+ $phids = array();
+ $phids[] = $object->getAuthorPHID();
+ foreach ($object->getReviewerStatus() as $reviewer) {
+ $phids[] = $reviewer->getReviewerPHID();
+ }
+ return $phids;
+ }
+
+ protected function getMailSubjectPrefix() {
+ return PhabricatorEnv::getEnvConfig('metamta.differential.subject-prefix');
+ }
+
+ protected function buildReplyHandler(PhabricatorLiskDAO $object) {
+ return id(new DifferentialReplyHandler())
+ ->setMailReceiver($object);
+ }
+
+ 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);
+ }
+
+ protected function buildMailBody(
+ PhabricatorLiskDAO $object,
+ array $xactions) {
+
+ $body = parent::buildMailBody($object, $xactions);
+
+ $body->addTextSection(
+ pht('REVISION DETAIL'),
+ PhabricatorEnv::getProductionURI('/D'.$object->getID()));
+
+ return $body;
+ }
+
protected function supportsSearch() {
return true;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 3:03 AM (14 h, 29 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6715381
Default Alt Text
D8303.diff (1 KB)

Event Timeline