Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15422328
D13886.id33523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13886.id33523.diff
View Options
diff --git a/src/applications/ponder/editor/PonderQuestionEditor.php b/src/applications/ponder/editor/PonderQuestionEditor.php
--- a/src/applications/ponder/editor/PonderQuestionEditor.php
+++ b/src/applications/ponder/editor/PonderQuestionEditor.php
@@ -212,6 +212,19 @@
return true;
}
+ public function getMailTagsMap() {
+ return array(
+ PonderQuestionTransaction::MAILTAG_DETAILS =>
+ pht('Someone changes the questions details.'),
+ PonderQuestionTransaction::MAILTAG_ANSWERS =>
+ pht('Someone adds a new answer.'),
+ PonderQuestionTransaction::MAILTAG_COMMENT =>
+ pht('Someone comments on the question.'),
+ PonderQuestionTransaction::MAILTAG_OTHER =>
+ pht('Other question activity not listed above occurs.'),
+ );
+ }
+
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
return id(new PonderQuestionReplyHandler())
->setMailReceiver($object);
diff --git a/src/applications/ponder/storage/PonderQuestionTransaction.php b/src/applications/ponder/storage/PonderQuestionTransaction.php
--- a/src/applications/ponder/storage/PonderQuestionTransaction.php
+++ b/src/applications/ponder/storage/PonderQuestionTransaction.php
@@ -8,6 +8,11 @@
const TYPE_ANSWERS = 'ponder.question:answer';
const TYPE_STATUS = 'ponder.question:status';
+ const MAILTAG_DETAILS = 'question:details';
+ const MAILTAG_COMMENT = 'question:comment';
+ const MAILTAG_ANSWERS = 'question:answer';
+ const MAILTAG_OTHER = 'question:other';
+
public function getApplicationName() {
return 'ponder';
}
@@ -105,6 +110,28 @@
return parent::getTitle();
}
+ public function getMailTags() {
+ $tags = parent::getMailTags();
+
+ switch ($this->getTransactionType()) {
+ case PhabricatorTransactions::TYPE_COMMENT:
+ $tags[] = self::MAILTAG_COMMENT;
+ break;
+ case self::TYPE_TITLE:
+ case self::TYPE_CONTENT:
+ case self::TYPE_STATUS:
+ $tags[] = self::MAILTAG_DETAILS;
+ break;
+ case self::TYPE_ANSWERS:
+ $tags[] = self::MAILTAG_ANSWERS;
+ break;
+ default:
+ $tags[] = self::MAILTAG_OTHER;
+ break;
+ }
+ return $tags;
+ }
+
public function getIcon() {
$old = $this->getOldValue();
$new = $this->getNewValue();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 7:18 AM (1 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7718083
Default Alt Text
D13886.id33523.diff (2 KB)
Attached To
Mode
D13886: Add mailtags to Ponder
Attached
Detach File
Event Timeline
Log In to Comment