summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-18 14:39:34 +0000
committerErik Johnston <erik@matrix.org>2016-01-18 14:50:17 +0000
commit345ff2196a8b381a3dfea537ab659aac0837045a (patch)
tree5e9656735a0eb7d97ccdbe327d3d13ea72836feb /synapse/push
parentMake unit tests work (diff)
downloadsynapse-345ff2196a8b381a3dfea537ab659aac0837045a.tar.xz
Don't edit ruleset
Diffstat (limited to 'synapse/push')
-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']