@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add mailtags to Ponder

Summary: Ref T3578 Adds mailtags to Ponder, answer stuff not quite ready, but that's another diff.

Test Plan: set preferences to notify, second account updates a question, get notification on first.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3578

Differential Revision: https://secure.phabricator.com/D13886

+40
+13
src/applications/ponder/editor/PonderQuestionEditor.php
··· 212 212 return true; 213 213 } 214 214 215 + public function getMailTagsMap() { 216 + return array( 217 + PonderQuestionTransaction::MAILTAG_DETAILS => 218 + pht('Someone changes the questions details.'), 219 + PonderQuestionTransaction::MAILTAG_ANSWERS => 220 + pht('Someone adds a new answer.'), 221 + PonderQuestionTransaction::MAILTAG_COMMENT => 222 + pht('Someone comments on the question.'), 223 + PonderQuestionTransaction::MAILTAG_OTHER => 224 + pht('Other question activity not listed above occurs.'), 225 + ); 226 + } 227 + 215 228 protected function buildReplyHandler(PhabricatorLiskDAO $object) { 216 229 return id(new PonderQuestionReplyHandler()) 217 230 ->setMailReceiver($object);
+27
src/applications/ponder/storage/PonderQuestionTransaction.php
··· 8 8 const TYPE_ANSWERS = 'ponder.question:answer'; 9 9 const TYPE_STATUS = 'ponder.question:status'; 10 10 11 + const MAILTAG_DETAILS = 'question:details'; 12 + const MAILTAG_COMMENT = 'question:comment'; 13 + const MAILTAG_ANSWERS = 'question:answer'; 14 + const MAILTAG_OTHER = 'question:other'; 15 + 11 16 public function getApplicationName() { 12 17 return 'ponder'; 13 18 } ··· 103 108 } 104 109 105 110 return parent::getTitle(); 111 + } 112 + 113 + public function getMailTags() { 114 + $tags = parent::getMailTags(); 115 + 116 + switch ($this->getTransactionType()) { 117 + case PhabricatorTransactions::TYPE_COMMENT: 118 + $tags[] = self::MAILTAG_COMMENT; 119 + break; 120 + case self::TYPE_TITLE: 121 + case self::TYPE_CONTENT: 122 + case self::TYPE_STATUS: 123 + $tags[] = self::MAILTAG_DETAILS; 124 + break; 125 + case self::TYPE_ANSWERS: 126 + $tags[] = self::MAILTAG_ANSWERS; 127 + break; 128 + default: 129 + $tags[] = self::MAILTAG_OTHER; 130 + break; 131 + } 132 + return $tags; 106 133 } 107 134 108 135 public function getIcon() {