Differential D19019 Diff 45588 src/applications/transactions/engineextension/PhabricatorEditorMailEngineExtension.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/engineextension/PhabricatorEditorMailEngineExtension.php
Show All 34 Lines | public function newMailStampTemplates($object) { | ||||
$templates[] = id(new PhabricatorPHIDMailStamp()) | $templates[] = id(new PhabricatorPHIDMailStamp()) | ||||
->setKey('mention') | ->setKey('mention') | ||||
->setLabel(pht('Mentioned User')); | ->setLabel(pht('Mentioned User')); | ||||
$templates[] = id(new PhabricatorStringMailStamp()) | $templates[] = id(new PhabricatorStringMailStamp()) | ||||
->setKey('herald') | ->setKey('herald') | ||||
->setLabel(pht('Herald Rule')); | ->setLabel(pht('Herald Rule')); | ||||
$templates[] = id(new PhabricatorPHIDMailStamp()) | |||||
->setKey('removed') | |||||
->setLabel(pht('Recipient Removed')); | |||||
return $templates; | return $templates; | ||||
} | } | ||||
public function newMailStamps($object, array $xactions) { | public function newMailStamps($object, array $xactions) { | ||||
$editor = $this->getEditor(); | $editor = $this->getEditor(); | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$this->getMailStamp('actor') | $this->getMailStamp('actor') | ||||
Show All 13 Lines | $this->getMailStamp('new') | ||||
->setValue($editor->getIsNewObject()); | ->setValue($editor->getIsNewObject()); | ||||
$mentioned_phids = $editor->getMentionedPHIDs(); | $mentioned_phids = $editor->getMentionedPHIDs(); | ||||
$this->getMailStamp('mention') | $this->getMailStamp('mention') | ||||
->setValue($mentioned_phids); | ->setValue($mentioned_phids); | ||||
$this->getMailStamp('herald') | $this->getMailStamp('herald') | ||||
->setValue($editor->getHeraldRuleMonograms()); | ->setValue($editor->getHeraldRuleMonograms()); | ||||
$this->getMailStamp('removed') | |||||
->setValue($editor->getRemovedRecipientPHIDs()); | |||||
} | } | ||||
} | } |