1
0

Fall back to checking power levels when sourcing local restricted join users (#19321)

Fix https://github.com/element-hq/synapse/issues/19120 by always falling
back to checking power levels for local users if a local creator cannot
be found in a v12 room.

Complement tests: https://github.com/matrix-org/complement/pull/836
This commit is contained in:
timedout
2026-01-12 18:00:33 +00:00
committed by GitHub
parent 8f42f07bef
commit 6e80f2c43a
2 changed files with 2 additions and 1 deletions

1
changelog.d/19321.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix joining a restricted v12 room locally when no local room creator is present but local users with sufficient power levels are. Contributed by @nexy7574.

View File

@@ -172,7 +172,7 @@ class EventAuthHandler:
if len(local_creators) > 0:
chosen_user = local_creators.pop() # random creator
user_power_level = CREATOR_POWER_LEVEL
else:
if chosen_user is None:
chosen_user = max(
local_users_in_room,
key=lambda user: users.get(user, users_default_level),