mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 08:03:15 -05:00
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.
This commit is contained in:
parent
67593b1728
commit
2ab0b021f1
7 changed files with 184 additions and 169 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue