Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14756997
D19666.id51154.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19666.id51154.diff
View Options
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
@@ -923,6 +923,11 @@
return $map;
}
+ public static function isAdapterEnabled(PhabricatorUser $viewer,
+ HeraldAdapter $adapter) {
+ return $adapter->isAvailableToUser($viewer);
+ }
+
public function getEditorValueForCondition(
PhabricatorUser $viewer,
HeraldCondition $condition) {
diff --git a/src/applications/herald/engine/HeraldEngine.php b/src/applications/herald/engine/HeraldEngine.php
--- a/src/applications/herald/engine/HeraldEngine.php
+++ b/src/applications/herald/engine/HeraldEngine.php
@@ -520,8 +520,7 @@
// In particular, this means that the application must be installed and
// accessible to the user. For example, if a user writes a Differential
// rule and then loses access to Differential, this disables the rule.
- $enabled = HeraldAdapter::getEnabledAdapterMap($rule->getAuthor());
- if (empty($enabled[$adapter->getAdapterContentType()])) {
+ if (!HeraldAdapter::isAdapterEnabled($rule->getAuthor(), $adapter)) {
return false;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 22, 9:37 PM (13 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7026512
Default Alt Text
D19666.id51154.diff (1 KB)
Attached To
Mode
D19666: Improve Herald Rule execution speed for Personal Herald rules by avoiding expensive lookup for all adapters and instead use specific adapter check
Attached
Detach File
Event Timeline
Log In to Comment