mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 15:30:58 +01: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:
parent
7f81fd4bf4
commit
2f01214322
7 changed files with 14 additions and 15 deletions
|
@ -1,8 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* @group audit
|
|
||||||
*/
|
|
||||||
final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
|
final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
|
|
||||||
public function validateMailReceiver($mail_receiver) {
|
public function validateMailReceiver($mail_receiver) {
|
||||||
|
@ -27,7 +24,7 @@ final class PhabricatorAuditReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
|
|
||||||
public function getReplyHandlerInstructions() {
|
public function getReplyHandlerInstructions() {
|
||||||
if ($this->supportsReplies()) {
|
if ($this->supportsReplies()) {
|
||||||
return "Reply to comment.";
|
return pht("Reply to comment.");
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* @group conpherence
|
|
||||||
*/
|
|
||||||
final class ConpherenceReplyHandler extends PhabricatorMailReplyHandler {
|
final class ConpherenceReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
|
|
||||||
private $mailAddedParticipantPHIDs;
|
private $mailAddedParticipantPHIDs;
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class LegalpadReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
|
|
||||||
public function getReplyHandlerInstructions() {
|
public function getReplyHandlerInstructions() {
|
||||||
if ($this->supportsReplies()) {
|
if ($this->supportsReplies()) {
|
||||||
return 'Reply to comment or !unsubscribe.';
|
return pht('Reply to comment or !unsubscribe.');
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ final class PhabricatorMacroReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
if ($this->supportsReplies()) {
|
if ($this->supportsReplies()) {
|
||||||
// TODO: Implement.
|
// TODO: Implement.
|
||||||
return null;
|
return null;
|
||||||
return "Reply to comment.";
|
return pht("Reply to comment.");
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,9 @@ final class ManiphestReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
|
|
||||||
public function getReplyHandlerInstructions() {
|
public function getReplyHandlerInstructions() {
|
||||||
if ($this->supportsReplies()) {
|
if ($this->supportsReplies()) {
|
||||||
return "Reply to comment or attach files, or !close, !claim, ".
|
return pht(
|
||||||
"!unsubscribe or !assign <username>.";
|
"Reply to comment or attach files, or !close, !claim, ".
|
||||||
|
"!unsubscribe or !assign <username>.");
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ final class PholioReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
if ($this->supportsReplies()) {
|
if ($this->supportsReplies()) {
|
||||||
// TODO: Implement.
|
// TODO: Implement.
|
||||||
return null;
|
return null;
|
||||||
return "Reply to comment.";
|
return pht("Reply to comment.");
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1721,6 +1721,12 @@ abstract class PhabricatorApplicationTransactionEditor
|
||||||
$mail_tags = $this->getMailTags($object, $xactions);
|
$mail_tags = $this->getMailTags($object, $xactions);
|
||||||
$action = $this->getMailAction($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
|
$template
|
||||||
->setFrom($this->requireActor()->getPHID())
|
->setFrom($this->requireActor()->getPHID())
|
||||||
->setSubjectPrefix($this->getMailSubjectPrefix())
|
->setSubjectPrefix($this->getMailSubjectPrefix())
|
||||||
|
@ -1755,9 +1761,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
||||||
$template->setParentMessageID($this->getParentMessageID());
|
$template->setParentMessageID($this->getParentMessageID());
|
||||||
}
|
}
|
||||||
|
|
||||||
$mails = $this
|
$mails = $reply_handler->multiplexMail(
|
||||||
->buildReplyHandler($object)
|
|
||||||
->multiplexMail(
|
|
||||||
$template,
|
$template,
|
||||||
array_select_keys($handles, $email_to),
|
array_select_keys($handles, $email_to),
|
||||||
array_select_keys($handles, $email_cc));
|
array_select_keys($handles, $email_cc));
|
||||||
|
|
Loading…
Reference in a new issue