diff --git a/src/applications/diffusion/herald/HeraldPreCommitAdapter.php b/src/applications/diffusion/herald/HeraldPreCommitAdapter.php --- a/src/applications/diffusion/herald/HeraldPreCommitAdapter.php +++ b/src/applications/diffusion/herald/HeraldPreCommitAdapter.php @@ -87,4 +87,8 @@ $this->hookEngine->getRepository()->getProjectPHIDs()); } + public function supportsWebhooks() { + return false; + } + } diff --git a/src/applications/herald/action/HeraldCallWebhookAction.php b/src/applications/herald/action/HeraldCallWebhookAction.php --- a/src/applications/herald/action/HeraldCallWebhookAction.php +++ b/src/applications/herald/action/HeraldCallWebhookAction.php @@ -14,6 +14,10 @@ } public function supportsObject($object) { + if (!$this->getAdapter()->supportsWebhooks()) { + return false; + } + return true; } diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php --- a/src/applications/herald/adapter/HeraldAdapter.php +++ b/src/applications/herald/adapter/HeraldAdapter.php @@ -1211,6 +1211,11 @@ /* -( Webhooks )----------------------------------------------------------- */ + public function supportsWebhooks() { + return true; + } + + final public function queueWebhook($webhook_phid, $rule_phid) { $this->webhookMap[$webhook_phid][] = $rule_phid; return $this; diff --git a/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php b/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php --- a/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php +++ b/src/applications/metamta/herald/PhabricatorMailOutboundMailHeraldAdapter.php @@ -64,4 +64,8 @@ return pht('Mail %d', $this->getObject()->getID()); } + public function supportsWebhooks() { + return false; + } + }