Page MenuHomePhabricator

D19061.diff
No OneTemporary

D19061.diff

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;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Sun, May 12, 2:50 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6287445
Default Alt Text
D19061.diff (1 KB)

Event Timeline