Don't ignore the obey overlay if the rule has an enabled attribute of False

Fixes https://github.com/vector-im/vector-web/issues/1244
This commit is contained in:
David Baker 2016-03-31 10:12:31 +01:00
parent a68c1b15aa
commit c27c51484a
1 changed files with 3 additions and 2 deletions

View File

@ -133,8 +133,9 @@ class PushRuleEvaluator:
enabled = self.enabled_map.get(r['rule_id'], None) enabled = self.enabled_map.get(r['rule_id'], None)
if enabled is not None and not enabled: if enabled is not None and not enabled:
continue continue
elif enabled is None and not r.get("enabled", True):
if not r.get("enabled", True): # if no override, check enabled on the rule itself
# (may have come from a base rule)
continue continue
conditions = r['conditions'] conditions = r['conditions']