summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-16 18:57:36 +0000
committerErik Johnston <erik@matrix.org>2014-12-16 18:57:36 +0000
commit96779d2490f64507148ae07a3f4e88f048185565 (patch)
treed8c2437995c8c3cff53cbd379c3105254d0156cd /synapse/handlers/federation.py
parentMerge branch 'hotfixes-v0.5.4' of github.com:matrix-org/synapse (diff)
downloadsynapse-96779d2490f64507148ae07a3f4e88f048185565.tar.xz
Fix bug where we did not send the full auth chain to people that joined over federation
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 925eb5376e..692c2d8a7b 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -285,7 +285,7 @@ class FederationHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def on_event_auth(self, event_id):
-        auth = yield self.store.get_auth_chain(event_id)
+        auth = yield self.store.get_auth_chain([event_id])
 
         for event in auth:
             event.signatures.update(
@@ -494,7 +494,10 @@ class FederationHandler(BaseHandler):
 
         yield self.replication_layer.send_pdu(new_pdu)
 
-        auth_chain = yield self.store.get_auth_chain(event.event_id)
+        state_ids = [e.event_id for e in event.state_events.values()]
+        auth_chain = yield self.store.get_auth_chain(set(
+            [event.event_id] + state_ids
+        ))
 
         defer.returnValue({
             "state": event.state_events.values(),