diff options
author | David Baker <dbkr@users.noreply.github.com> | 2016-03-31 10:26:22 +0100 |
---|---|---|
committer | David Baker <dbkr@users.noreply.github.com> | 2016-03-31 10:26:22 +0100 |
commit | c9500a9c1de21c379e75e3c40af32ebe96cc8bff (patch) | |
tree | 29051314b4e3e4d10c50eaa743ca38b236963ece | |
parent | spell out more packages (diff) | |
parent | Don't ignore the obey overlay if the rule has an enabled attribute of False (diff) | |
download | synapse-c9500a9c1de21c379e75e3c40af32ebe96cc8bff.tar.xz |
Merge pull request #678 from matrix-org/dbkr/push_obey_enable
Don't ignore the obey overlay if the rule has an enabled attribute of False
-rw-r--r-- | synapse/push/push_rule_evaluator.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py index 51f73a5b78..c3c2877629 100644 --- a/synapse/push/push_rule_evaluator.py +++ b/synapse/push/push_rule_evaluator.py @@ -133,8 +133,9 @@ class PushRuleEvaluator: enabled = self.enabled_map.get(r['rule_id'], None) if enabled is not None and not enabled: continue - - if not r.get("enabled", True): + elif enabled is None and not r.get("enabled", True): + # if no override, check enabled on the rule itself + # (may have come from a base rule) continue conditions = r['conditions'] |