mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-29 17:00:59 +01:00
Fix Ponder Answer email reply handler
Summary: Should fix all email reply issues, but no solid means of testing at home (how do you local reply test?) Test Plan: Check for answer mail in /mail/ and see proper headers. Make sure question mail works too. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T3846 Differential Revision: https://secure.phabricator.com/D13951
This commit is contained in:
parent
ad93af8389
commit
ed77b639f0
3 changed files with 17 additions and 23 deletions
|
@ -86,16 +86,17 @@ final class PonderAnswerEditor extends PonderEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
|
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
|
||||||
$question = $object->getQuestion();
|
return id(new PonderAnswerReplyHandler())
|
||||||
return id(new PonderQuestionReplyHandler())
|
->setMailReceiver($object);
|
||||||
->setMailReceiver($question);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
|
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
|
||||||
$question = $object->getQuestion();
|
$id = $object->getID();
|
||||||
return parent::buildMailTemplate($question);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return id(new PhabricatorMetaMTAMail())
|
||||||
|
->setSubject("ANSR{$id}")
|
||||||
|
->addHeader('Thread-Topic', "ANSR{$id}");
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildMailBody(
|
protected function buildMailBody(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
|
|
|
@ -7,23 +7,6 @@ abstract class PonderEditor
|
||||||
return 'PhabricatorPonderApplication';
|
return 'PhabricatorPonderApplication';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shouldPublishFeedStory(
|
|
||||||
PhabricatorLiskDAO $object,
|
|
||||||
array $xactions) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
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}");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
protected function getMailTo(PhabricatorLiskDAO $object) {
|
protected function getMailTo(PhabricatorLiskDAO $object) {
|
||||||
return array(
|
return array(
|
||||||
$object->getAuthorPHID(),
|
$object->getAuthorPHID(),
|
||||||
|
|
|
@ -231,6 +231,16 @@ final class PonderQuestionEditor
|
||||||
->setMailReceiver($object);
|
->setMailReceiver($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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}");
|
||||||
|
}
|
||||||
|
|
||||||
protected function buildMailBody(
|
protected function buildMailBody(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
array $xactions) {
|
array $xactions) {
|
||||||
|
|
Loading…
Reference in a new issue