1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00

Restore reply instructions to ApplicationTransaction email

Summary: This "Reply to comment, etc., etc." section got lost along the way at some point. Restore it for transaction mail.

Test Plan: Received mail from Maniphest with reply instructions.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8700
This commit is contained in:
epriestley 2014-04-04 11:14:21 -07:00
parent 7f81fd4bf4
commit 2f01214322
7 changed files with 14 additions and 15 deletions

View file

@ -1,8 +1,5 @@
<?php
/**
* @group audit
*/
final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
public function validateMailReceiver($mail_receiver) {
@ -27,7 +24,7 @@ final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
public function getReplyHandlerInstructions() {
if ($this->supportsReplies()) {
return "Reply to comment.";
return pht("Reply to comment.");
} else {
return null;
}

View file

@ -1,8 +1,5 @@
<?php
/**
* @group conpherence
*/
final class ConpherenceReplyHandler extends PhabricatorMailReplyHandler {
private $mailAddedParticipantPHIDs;

View file

@ -27,7 +27,7 @@ final class LegalpadReplyHandler extends PhabricatorMailReplyHandler {
public function getReplyHandlerInstructions() {
if ($this->supportsReplies()) {
return 'Reply to comment or !unsubscribe.';
return pht('Reply to comment or !unsubscribe.');
} else {
return null;
}

View file

@ -26,7 +26,7 @@ final class PhabricatorMacroReplyHandler extends PhabricatorMailReplyHandler {
if ($this->supportsReplies()) {
// TODO: Implement.
return null;
return "Reply to comment.";
return pht("Reply to comment.");
} else {
return null;
}

View file

@ -27,8 +27,9 @@ final class ManiphestReplyHandler extends PhabricatorMailReplyHandler {
public function getReplyHandlerInstructions() {
if ($this->supportsReplies()) {
return "Reply to comment or attach files, or !close, !claim, ".
"!unsubscribe or !assign <username>.";
return pht(
"Reply to comment or attach files, or !close, !claim, ".
"!unsubscribe or !assign <username>.");
} else {
return null;
}

View file

@ -29,7 +29,7 @@ final class PholioReplyHandler extends PhabricatorMailReplyHandler {
if ($this->supportsReplies()) {
// TODO: Implement.
return null;
return "Reply to comment.";
return pht("Reply to comment.");
} else {
return null;
}

View file

@ -1721,6 +1721,12 @@ abstract class PhabricatorApplicationTransactionEditor
$mail_tags = $this->getMailTags($object, $xactions);
$action = $this->getMailAction($object, $xactions);
$reply_handler = $this->buildReplyHandler($object);
$reply_section = $reply_handler->getReplyHandlerInstructions();
if ($reply_section !== null) {
$body->addReplySection($reply_section);
}
$template
->setFrom($this->requireActor()->getPHID())
->setSubjectPrefix($this->getMailSubjectPrefix())
@ -1755,9 +1761,7 @@ abstract class PhabricatorApplicationTransactionEditor
$template->setParentMessageID($this->getParentMessageID());
}
$mails = $this
->buildReplyHandler($object)
->multiplexMail(
$mails = $reply_handler->multiplexMail(
$template,
array_select_keys($handles, $email_to),
array_select_keys($handles, $email_cc));