diff options
author | Erik Johnston <erik@matrix.org> | 2020-11-17 10:51:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 10:51:25 +0000 |
commit | f737368a26bb9eea401fcc3a5bdd7e0b59e91f09 (patch) | |
tree | ee8e6f8e971c5d9f3dd136f0c036d77245bb100d /synapse/handlers/room_member.py | |
parent | Merge pull request #8757 from matrix-org/rav/pass_site_to_make_request (diff) | |
download | synapse-f737368a26bb9eea401fcc3a5bdd7e0b59e91f09.tar.xz |
Add admin API for logging in as a user (#8617)
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r-- | synapse/handlers/room_member.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index fd85e08973..70f8966267 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -965,6 +965,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] @@ -1059,7 +1060,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" ) |