From bccdbacf4419a8af4c7eae97f2fb90d03c694b52 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 27 Jul 2015 07:51:37 -0700 Subject: [PATCH] Add tokens to Macro Summary: A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. Test Plan: Award a token to a macro. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13725 --- src/__phutil_library_map__.php | 1 + .../macro/storage/PhabricatorFileImageMacro.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 1ec46fffa7..7f2a56e406 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -5924,6 +5924,7 @@ phutil_register_library_map(array( 'PhabricatorSubscribableInterface', 'PhabricatorApplicationTransactionInterface', 'PhabricatorFlaggableInterface', + 'PhabricatorTokenReceiverInterface', 'PhabricatorPolicyInterface', ), 'PhabricatorFileImageTransform' => 'PhabricatorFileTransform', diff --git a/src/applications/macro/storage/PhabricatorFileImageMacro.php b/src/applications/macro/storage/PhabricatorFileImageMacro.php index 0d68bf0c1b..72a6577924 100644 --- a/src/applications/macro/storage/PhabricatorFileImageMacro.php +++ b/src/applications/macro/storage/PhabricatorFileImageMacro.php @@ -5,6 +5,7 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO PhabricatorSubscribableInterface, PhabricatorApplicationTransactionInterface, PhabricatorFlaggableInterface, + PhabricatorTokenReceiverInterface, PhabricatorPolicyInterface { protected $authorPHID; @@ -119,6 +120,16 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO } +/* -( PhabricatorTokenRecevierInterface )---------------------------------- */ + + + public function getUsersToNotifyOfTokenGiven() { + return array( + $this->getAuthorPHID(), + ); + } + + /* -( PhabricatorPolicyInterface )----------------------------------------- */