mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 02:43:45 +01:00
Merge pull request #2552 from matrix-org/rav/fix_500_on_dodgy_powerlevels
Fix 500 error when fields missing from power_levels event
This commit is contained in:
commit
b5dbbac308
1 changed files with 3 additions and 3 deletions
|
@ -470,14 +470,14 @@ def _check_power_levels(event, auth_events):
|
|||
("invite", None),
|
||||
]
|
||||
|
||||
old_list = current_state.content.get("users")
|
||||
old_list = current_state.content.get("users", {})
|
||||
for user in set(old_list.keys() + user_list.keys()):
|
||||
levels_to_check.append(
|
||||
(user, "users")
|
||||
)
|
||||
|
||||
old_list = current_state.content.get("events")
|
||||
new_list = event.content.get("events")
|
||||
old_list = current_state.content.get("events", {})
|
||||
new_list = event.content.get("events", {})
|
||||
for ev_id in set(old_list.keys() + new_list.keys()):
|
||||
levels_to_check.append(
|
||||
(ev_id, "events")
|
||||
|
|
Loading…
Reference in a new issue