Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14040505
D13712.id33135.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
D13712.id33135.diff
View Options
diff --git a/src/applications/badges/editor/PhabricatorBadgesEditor.php b/src/applications/badges/editor/PhabricatorBadgesEditor.php
--- a/src/applications/badges/editor/PhabricatorBadgesEditor.php
+++ b/src/applications/badges/editor/PhabricatorBadgesEditor.php
@@ -142,6 +142,23 @@
return $errors;
}
+ protected function shouldSendMail(
+ PhabricatorLiskDAO $object,
+ array $xactions) {
+ return true;
+ }
+
+ public function getMailTagsMap() {
+ return array(
+ PhabricatorBadgesTransaction::MAILTAG_DETAILS =>
+ pht('Someone changes the badge\'s details.'),
+ PhabricatorBadgesTransaction::MAILTAG_COMMENT =>
+ pht('Someone comments on a badge.'),
+ PhabricatorBadgesTransaction::MAILTAG_OTHER =>
+ pht('Other badge activity not listed above occurs.'),
+ );
+ }
+
protected function shouldPublishFeedStory(
PhabricatorLiskDAO $object,
array $xactions) {
diff --git a/src/applications/badges/storage/PhabricatorBadgesTransaction.php b/src/applications/badges/storage/PhabricatorBadgesTransaction.php
--- a/src/applications/badges/storage/PhabricatorBadgesTransaction.php
+++ b/src/applications/badges/storage/PhabricatorBadgesTransaction.php
@@ -10,6 +10,11 @@
const TYPE_STATUS = 'badges:status';
const TYPE_FLAVOR = 'badges:flavor';
+ const MAILTAG_NAME = 'badges:name';
+ const MAILTAG_DETAILS = 'badges:details';
+ const MAILTAG_COMMENT = 'badges:comment';
+ const MAILTAG_OTHER = 'badges:other';
+
public function getApplicationName() {
return 'badges';
}
@@ -168,6 +173,28 @@
return parent::getTitleForFeed();
}
+ public function getMailTags() {
+ $tags = parent::getMailTags();
+
+ switch ($this->getTransactionType()) {
+ case PhabricatorTransactions::TYPE_COMMENT:
+ $tags[] = self::MAILTAG_COMMENT;
+ break;
+ case self::TYPE_NAME:
+ case self::TYPE_DESCRIPTION:
+ case self::TYPE_FLAVOR:
+ case self::TYPE_ICON:
+ case self::TYPE_STATUS:
+ case self::TYPE_QUALITY:
+ $tags[] = self::MAILTAG_DETAILS;
+ break;
+ default:
+ $tags[] = self::MAILTAG_OTHER;
+ break;
+ }
+ return $tags;
+ }
+
public function shouldHide() {
$old = $this->getOldValue();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 12, 10:41 AM (6 d, 11 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719231
Default Alt Text
D13712.id33135.diff (2 KB)
Attached To
Mode
D13712: Add MAILTAGs to Badges
Attached
Detach File
Event Timeline
Log In to Comment