Skip to content
Snippets Groups Projects
Unverified Commit c167e09f authored by reivilibre's avatar reivilibre Committed by GitHub
Browse files

Fix explicit assignment of PL 0 from being misinterpreted in rare circumstances (#10499)

parent b7f7ca24
No related branches found
No related tags found
No related merge requests found
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: ...@@ -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) power_level_event = get_power_level_event(auth_events)
if power_level_event: if power_level_event:
level = power_level_event.content.get("users", {}).get(user_id) 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) level = power_level_event.content.get("users_default", 0)
if level is None: if level is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment