Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13967577
D12404.id29793.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
D12404.id29793.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D12404: Add Mailtags to Paste
Attached
Detach File
Event Timeline
Log In to Comment