Page MenuHomePhabricator

D12404.id29797.diff
No OneTemporary

D12404.id29797.diff

diff --git a/src/applications/paste/editor/PhabricatorPasteEditor.php b/src/applications/paste/editor/PhabricatorPasteEditor.php
--- a/src/applications/paste/editor/PhabricatorPasteEditor.php
+++ b/src/applications/paste/editor/PhabricatorPasteEditor.php
@@ -153,6 +153,17 @@
);
}
+ public function getMailTagsMap() {
+ return array(
+ PhabricatorPasteTransaction::MAILTAG_CONTENT =>
+ pht('Paste title, language or text changes.'),
+ PhabricatorPasteTransaction::MAILTAG_COMMENT =>
+ pht('Someone comments on a paste.'),
+ PhabricatorPasteTransaction::MAILTAG_OTHER =>
+ pht('Other paste activity not listed above occurs.'),
+ );
+ }
+
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
return id(new PasteReplyHandler())
->setMailReceiver($object);
diff --git a/src/applications/paste/storage/PhabricatorPasteTransaction.php b/src/applications/paste/storage/PhabricatorPasteTransaction.php
--- a/src/applications/paste/storage/PhabricatorPasteTransaction.php
+++ b/src/applications/paste/storage/PhabricatorPasteTransaction.php
@@ -7,6 +7,10 @@
const TYPE_TITLE = 'paste.title';
const TYPE_LANGUAGE = 'paste.language';
+ const MAILTAG_CONTENT = 'paste-content';
+ const MAILTAG_OTHER = 'paste-other';
+ const MAILTAG_COMMENT = 'paste-comment';
+
public function getApplicationName() {
return 'pastebin';
}
@@ -182,4 +186,22 @@
return parent::renderChangeDetails($viewer);
}
+ public function getMailTags() {
+ $tags = array();
+ switch ($this->getTransactionType()) {
+ case self::TYPE_TITLE:
+ case self::TYPE_CONTENT:
+ case self::TYPE_LANGUAGE:
+ $tags[] = self::MAILTAG_CONTENT;
+ break;
+ case PhabricatorTransactions::TYPE_COMMENT:
+ $tags[] = self::MAILTAG_COMMENT;
+ break;
+ default:
+ $tags[] = self::MAILTAG_OTHER;
+ break;
+ }
+ return $tags;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Oct 15 2024, 9:11 AM (5 w, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712209
Default Alt Text
D12404.id29797.diff (1 KB)

Event Timeline