diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-07-09 10:40:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-09 10:40:19 +0100 |
commit | 2ab0b021f153f527aa40080fe6e522df3ff976bc (patch) | |
tree | 625594f1b0c6d3e3deef280e91ecb76cbee5af31 /synapse/handlers/room_member_worker.py | |
parent | Add `HomeServer.signing_key` property (#7805) (diff) | |
download | synapse-2ab0b021f153f527aa40080fe6e522df3ff976bc.tar.xz |
Generate real events when we reject invites (#7804)
Fixes #2181. The basic premise is that, when we fail to reject an invite via the remote server, we can generate our own out-of-band leave event and persist it as an outlier, so that we have something to send to the client.
Diffstat (limited to 'synapse/handlers/room_member_worker.py')
-rw-r--r-- | synapse/handlers/room_member_worker.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/synapse/handlers/room_member_worker.py b/synapse/handlers/room_member_worker.py index 02e0c4103d..ac03f15166 100644 --- a/synapse/handlers/room_member_worker.py +++ b/synapse/handlers/room_member_worker.py @@ -61,21 +61,22 @@ class RoomMemberWorkerHandler(RoomMemberHandler): return ret["event_id"], ret["stream_id"] - async def _remote_reject_invite( + async def remote_reject_invite( self, + invite_event_id: str, + txn_id: Optional[str], requester: Requester, - remote_room_hosts: List[str], - room_id: str, - target: UserID, content: dict, ) -> Tuple[Optional[str], int]: - """Implements RoomMemberHandler._remote_reject_invite + """ + Rejects an out-of-band invite received from a remote user + + Implements RoomMemberHandler.remote_reject_invite """ ret = await self._remote_reject_client( + invite_event_id=invite_event_id, + txn_id=txn_id, requester=requester, - remote_room_hosts=remote_room_hosts, - room_id=room_id, - user_id=target.to_string(), content=content, ) return ret["event_id"], ret["stream_id"] |