Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / spaces / engineextension / PhabricatorSpacesMailEngineExtension.php
blob7ddbda05feb0d543900cadc085d87a6bfbe51da1
1 <?php
3 final class PhabricatorSpacesMailEngineExtension
4 extends PhabricatorMailEngineExtension {
6 const EXTENSIONKEY = 'spaces';
8 public function supportsObject($object) {
9 return ($object instanceof PhabricatorSpacesInterface);
12 public function newMailStampTemplates($object) {
13 return array(
14 id(new PhabricatorPHIDMailStamp())
15 ->setKey('space')
16 ->setLabel(pht('Space')),
20 public function newMailStamps($object, array $xactions) {
21 $editor = $this->getEditor();
22 $viewer = $this->getViewer();
24 if (!PhabricatorSpacesNamespaceQuery::getSpacesExist()) {
25 return;
28 $space_phid = PhabricatorSpacesNamespaceQuery::getObjectSpacePHID(
29 $object);
31 $this->getMailStamp('space')
32 ->setValue($space_phid);