From f42fa8b15bf345cc1457077a6cde16193a355b7f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 21 Oct 2020 16:50:59 +0100 Subject: Correctly set authenticated_entity when creating ad hoc requesters --- synapse/handlers/room_member.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'synapse/handlers/room_member.py') diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index ec784030e9..991ae9eab6 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -961,6 +961,7 @@ class RoomMemberMasterHandler(RoomMemberHandler): self.distributor = hs.get_distributor() self.distributor.declare("user_left_room") + self._server_name = hs.hostname async def _is_remote_room_too_complex( self, room_id: str, remote_room_hosts: List[str] @@ -1055,7 +1056,9 @@ class RoomMemberMasterHandler(RoomMemberHandler): return event_id, stream_id # The room is too large. Leave. - requester = types.create_requester(user, None, False, False, None) + requester = types.create_requester( + user, authenticated_entity=self._server_name + ) await self.update_membership( requester=requester, target=user, room_id=room_id, action="leave" ) -- cgit 1.4.1