summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/push/push_rule_evaluator.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py
index bbc8308c2d..60d9f1f239 100644
--- a/synapse/push/push_rule_evaluator.py
+++ b/synapse/push/push_rule_evaluator.py
@@ -131,11 +131,10 @@ class PushRuleEvaluator:
         evaluator = PushRuleEvaluatorForEvent.create(ev, room_member_count)
 
         for r in self.rules:
-            if r['rule_id'] in self.enabled_map:
-                r['enabled'] = self.enabled_map[r['rule_id']]
-            elif 'enabled' not in r:
-                r['enabled'] = True
-            if not r['enabled']:
+            if self.enabled_map.get(r['rule_id'], None) is False:
+                continue
+
+            if not r.get("enabled", True):
                 continue
 
             conditions = r['conditions']