mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Make Ponder Emails a little more consistently delivered
Summary: Ref T9271, maybe fixes it. This restores feed publishing for answers (broken in D13951) and sends the author of the question an email for new answers. Also, unsure how to pull all question subsribers to the answer email, or is it automagical? Test Plan: notchad asks a question, chad answers, log into notchad and see that mail was delivered, see feed story. Reviewers: epriestley Reviewed By: epriestley Subscribers: revi, Korvin Maniphest Tasks: T9271 Differential Revision: https://secure.phabricator.com/D14171
This commit is contained in:
parent
1ac919c29c
commit
ae082c6033
3 changed files with 28 additions and 7 deletions
|
@ -85,6 +85,27 @@ final class PonderAnswerEditor extends PonderEditor {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected function getMailTo(PhabricatorLiskDAO $object) {
|
||||
$phids = array();
|
||||
$phids[] = $object->getAuthorPHID();
|
||||
$phids[] = $this->requireActor()->getPHID();
|
||||
|
||||
$question = id(new PonderQuestionQuery())
|
||||
->setViewer($this->requireActor())
|
||||
->withIDs(array($object->getQuestionID()))
|
||||
->executeOne();
|
||||
|
||||
$phids[] = $question->getAuthorPHID();
|
||||
|
||||
return $phids;
|
||||
}
|
||||
|
||||
protected function shouldPublishFeedStory(
|
||||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
|
||||
return id(new PonderAnswerReplyHandler())
|
||||
->setMailReceiver($object);
|
||||
|
|
|
@ -7,13 +7,6 @@ abstract class PonderEditor
|
|||
return 'PhabricatorPonderApplication';
|
||||
}
|
||||
|
||||
protected function getMailTo(PhabricatorLiskDAO $object) {
|
||||
return array(
|
||||
$object->getAuthorPHID(),
|
||||
$this->requireActor()->getPHID(),
|
||||
);
|
||||
}
|
||||
|
||||
protected function getMailSubjectPrefix() {
|
||||
return '[Ponder]';
|
||||
}
|
||||
|
|
|
@ -209,6 +209,13 @@ final class PonderQuestionEditor
|
|||
return true;
|
||||
}
|
||||
|
||||
protected function getMailTo(PhabricatorLiskDAO $object) {
|
||||
return array(
|
||||
$object->getAuthorPHID(),
|
||||
$this->requireActor()->getPHID(),
|
||||
);
|
||||
}
|
||||
|
||||
protected function shouldPublishFeedStory(
|
||||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
|
|
Loading…
Reference in a new issue