summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-06-23 12:54:50 +0100
committerGitHub <noreply@github.com>2021-06-23 12:54:50 +0100
commit8beead66ae48aa11f1e25da42256eb92b8bce099 (patch)
tree5f8b22b1c5712f8a5ada8f3f3f0681bdcfd38f3a /synapse/handlers/federation.py
parentDrop Origin & Accept from Access-Control-Allow-Headers value (#10114) (diff)
downloadsynapse-8beead66ae48aa11f1e25da42256eb92b8bce099.tar.xz
Send out invite rejections and knocks over federation (#10223)
ensure that events sent via `send_leave` and `send_knock` are sent on to
the rest of the federation.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 1b566dbf2d..74d169a2ac 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -1980,6 +1980,13 @@ class FederationHandler(BaseHandler):
 
         event.internal_metadata.outlier = False
 
+        # Send this event on behalf of the other server.
+        #
+        # The remote server isn't a full participant in the room at this point, so
+        # may not have an up-to-date list of the other homeservers participating in
+        # the room, so we send it on their behalf.
+        event.internal_metadata.send_on_behalf_of = origin
+
         context = await self.state_handler.compute_event_context(event)
         await self._auth_and_persist_event(origin, event, context)
 
@@ -2084,6 +2091,13 @@ class FederationHandler(BaseHandler):
 
         event.internal_metadata.outlier = False
 
+        # Send this event on behalf of the other server.
+        #
+        # The remote server isn't a full participant in the room at this point, so
+        # may not have an up-to-date list of the other homeservers participating in
+        # the room, so we send it on their behalf.
+        event.internal_metadata.send_on_behalf_of = origin
+
         context = await self.state_handler.compute_event_context(event)
 
         event_allowed = await self.third_party_event_rules.check_event_allowed(