summary refs log tree commit diff
path: root/synapse/push/push_rule_evaluator.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-18 17:34:02 +0000
committerErik Johnston <erik@matrix.org>2016-01-18 17:34:02 +0000
commit003853e702a9ce1c58da7d326402a1f2cfa69e1f (patch)
tree010fd165b08410de52c88faaed0dd98d8ae838d3 /synapse/push/push_rule_evaluator.py
parentYou need to escape backslashes (diff)
downloadsynapse-003853e702a9ce1c58da7d326402a1f2cfa69e1f.tar.xz
Preserve truthiness
Diffstat (limited to 'synapse/push/push_rule_evaluator.py')
-rw-r--r--synapse/push/push_rule_evaluator.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py
index 2524922131..379652c513 100644
--- a/synapse/push/push_rule_evaluator.py
+++ b/synapse/push/push_rule_evaluator.py
@@ -130,7 +130,8 @@ class PushRuleEvaluator:
         evaluator = PushRuleEvaluatorForEvent(ev, room_member_count)
 
         for r in self.rules:
-            if self.enabled_map.get(r['rule_id'], None) is False:
+            enabled = self.enabled_map.get(r['rule_id'], None)
+            if enabled is not None and not enabled:
                 continue
 
             if not r.get("enabled", True):