mirror of
https://github.com/element-hq/synapse
synced 2024-09-03 22:30:06 +00:00
Don't crash if a user has no push rule enabled entries
This commit is contained in:
parent
52bdd1b834
commit
7065b75bfd
1 changed files with 3 additions and 0 deletions
|
@ -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]:
|
||||
|
|
Loading…
Reference in a new issue