Page MenuHomePhabricator

D12404.id29793.diff
No OneTemporary

D12404.id29793.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,19 @@
);
}
+ public function getMailTagsMap() {
+ return array(
+ PhabricatorPasteTransaction::MAILTAG_TITLE =>
+ pht('Someone changes the title on a paste.'),
+ PhabricatorPasteTransaction::MAILTAG_CONTENT =>
+ pht('Paste text or description changes.'),
+ PhabricatorPasteTransaction::MAILTAG_LANGUAGE =>
+ pht('Someone changes the language of 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,11 @@
const TYPE_TITLE = 'paste.title';
const TYPE_LANGUAGE = 'paste.language';
+ const MAILTAG_TITLE = 'paste-title';
+ const MAILTAG_CONTENT = 'paste-content';
+ const MAILTAG_LANGUAGE = 'paste-language';
+ const MAILTAG_OTHER = 'paste-other';
+
public function getApplicationName() {
return 'pastebin';
}
@@ -182,4 +187,23 @@
return parent::renderChangeDetails($viewer);
}
+ public function getMailTags() {
+ $tags = array();
+ switch ($this->getTransactionType()) {
+ case self::TYPE_TITLE:
+ $tags[] = self::MAILTAG_TITLE;
+ break;
+ case self::TYPE_CONTENT:
+ $tags[] = self::MAILTAG_CONTENT;
+ break;
+ case self::TYPE_LANGUAGE:
+ $tags[] = self::MAILTAG_LANGUAGE;
+ break;
+ default:
+ $tags[] = self::MAILTAG_OTHER;
+ break;
+ }
+ return $tags;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Oct 17 2024, 2:34 PM (4 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722421
Default Alt Text
D12404.id29793.diff (2 KB)

Event Timeline