mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-15 22:42:23 +01:00
Fix explicit assignment of PL 0 from being misinterpreted in rare circumstances (#10499)
This commit is contained in:
parent
b7f7ca24b1
commit
c167e09fe5
2 changed files with 2 additions and 1 deletions
1
changelog.d/10499.bugfix
Normal file
1
changelog.d/10499.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix a bug which caused an explicit assignment of power-level 0 to a user to be misinterpreted in rare circumstances.
|
|
@ -692,7 +692,7 @@ def get_user_power_level(user_id: str, auth_events: StateMap[EventBase]) -> int:
|
|||
power_level_event = get_power_level_event(auth_events)
|
||||
if power_level_event:
|
||||
level = power_level_event.content.get("users", {}).get(user_id)
|
||||
if not level:
|
||||
if level is None:
|
||||
level = power_level_event.content.get("users_default", 0)
|
||||
|
||||
if level is None:
|
||||
|
|
Loading…
Reference in a new issue