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

Commit 971adec

Browse files
committed
Send out invite rejections over federation
ensure that leave events sent via `send_leave` are sent on to the rest of the federation. Fixes #10222.
1 parent a5cd05b commit 971adec

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

changelog.d/10223.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a long-standing bug which meant that invite rejections were not sent out over federation in a timely manner.

synapse/handlers/federation.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,6 +1980,13 @@ async def on_send_leave_request(self, origin: str, pdu: EventBase) -> None:
19801980

19811981
event.internal_metadata.outlier = False
19821982

1983+
# Send this event on behalf of the other server.
1984+
#
1985+
# The remote server isn't a full participant in the room at this point, so
1986+
# may not have an up-to-date list of the other homeservers participating in
1987+
# the room, so we send it on their behalf.
1988+
event.internal_metadata.send_on_behalf_of = origin
1989+
19831990
context = await self.state_handler.compute_event_context(event)
19841991
await self._auth_and_persist_event(origin, event, context)
19851992

0 commit comments

Comments
 (0)