Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
phorge src applications subscriptions engineextension PhabricatorSubscriptionsMailEngineExtension.php
819 B · 32 lines
PHP
123456789101112131415161718192021222324252627282930313233<?php
final class PhabricatorSubscriptionsMailEngineExtension extends PhabricatorMailEngineExtension {
const EXTENSIONKEY = 'subscriptions';
public function supportsObject($object) { return ($object instanceof PhabricatorSubscribableInterface); }
public function newMailStampTemplates($object) { return array( id(new PhabricatorPHIDMailStamp()) ->setKey('subscriber') ->setLabel(pht('Subscriber')), ); }
public function newMailStamps($object, array $xactions) { $editor = $this->getEditor(); $viewer = $this->getViewer();
$subscriber_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( $object->getPHID(), PhabricatorObjectHasSubscriberEdgeType::EDGECONST);
$this->getMailStamp('subscriber') ->setValue($subscriber_phids); }
}