diff options
author | David Baker <dave@matrix.org> | 2016-01-22 15:13:44 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-01-22 15:13:44 +0000 |
commit | 7065b75bfd52a87771ad36537a374826dc45496a (patch) | |
tree | 39227aed811880ffbcd5a23c07a08b1f8edead22 /synapse/push | |
parent | Overlay the push_rules_enabled map for users, otherwise they won't be able to... (diff) | |
download | synapse-7065b75bfd52a87771ad36537a374826dc45496a.tar.xz |
Don't crash if a user has no push rule enabled entries
Diffstat (limited to 'synapse/push')
-rw-r--r-- | synapse/push/bulk_push_rule_evaluator.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/push/bulk_push_rule_evaluator.py b/synapse/push/bulk_push_rule_evaluator.py index baa32a4e18..06250d2d96 100644 --- a/synapse/push/bulk_push_rule_evaluator.py +++ b/synapse/push/bulk_push_rule_evaluator.py @@ -50,6 +50,9 @@ def _get_rules(room_id, user_ids, store): # fetch disabled rules, but this won't account for any server default # rules the user has disabled, so we need to do this too. for uid in user_ids: + if uid not in rules_enabled_by_user: + continue + user_enabled_map = rules_enabled_by_user[uid] for rule in rules_by_user[uid]: |