Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 5aa985d

Browse files
committed
Lint
1 parent 9970af8 commit 5aa985d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

synapse/handlers/event_auth.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,12 @@ async def get_user_which_could_invite(
126126

127127
# Find the user with the highest power level.
128128
users_in_room = await self._store.get_users_in_room(room_id)
129+
# Only interested in local users.
130+
local_users_in_room = [
131+
u for u in users_in_room if get_domain_from_id(u) == self._server_name
132+
]
129133
chosen_user = max(
130-
# Only interested in local users.
131-
filter(lambda u: get_domain_from_id(u) == self._server_name, users_in_room),
134+
local_users_in_room,
132135
key=lambda user: users.get(user, users_default_level),
133136
default=None,
134137
)

0 commit comments

Comments
 (0)