1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02: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:
Chad Little 2015-09-29 14:25:28 -07:00
parent 1ac919c29c
commit ae082c6033
3 changed files with 28 additions and 7 deletions

View file

@ -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);

View file

@ -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]';
}

View file

@ -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) {