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 19:11:13 +0000
committerErik Johnston <erik@matrix.org>2014-12-16 19:11:13 +0000
commit2215faa361dae861d946956f04dad629353db1ce (patch)
treeafcc54e8847c6a1ea66be9bf94bfca9197e2ff18 /synapse/handlers/federation.py
parentMake error messages slightly more helpful (diff)
parentAdd FIXME (diff)
downloadsynapse-2215faa361dae861d946956f04dad629353db1ce.tar.xz
Merge branch 'hotfixes-v0.5.4a' of github.com:matrix-org/synapse into release-v0.6.0
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index fadb48fde6..cd9e655f95 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -173,6 +173,7 @@ class FederationHandler(BaseHandler):
                     context=event.room_id,
                     event_id=event.event_id,
                 )
+                # FIXME: Get auth chain for these state events
 
             current_state = state
 
@@ -288,7 +289,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(
@@ -528,7 +529,10 @@ class FederationHandler(BaseHandler):
 
         yield self.replication_layer.send_pdu(new_pdu, destinations)
 
-        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": context.current_state.values(),