Don't edit ruleset

This commit is contained in:
Erik Johnston 2016-01-18 14:39:34 +00:00
parent 2c176e02ae
commit 345ff2196a

View file

@ -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']