summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-07 11:22:12 +0000
committerErik Johnston <erik@matrix.org>2014-11-07 11:22:12 +0000
commit3b4dec442da51c6c999dd946db6ea6ce5f07ff0c (patch)
treeaad98c0fe05b4e403db5c37591124c1557ef3d22 /synapse/handlers
parentFix bug in _get_auth_chain_txn (diff)
downloadsynapse-3b4dec442da51c6c999dd946db6ea6ce5f07ff0c.tar.xz
Return auth chain when handling send_join
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 09593303a4..c193da12b7 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -366,10 +366,19 @@ class FederationHandler(BaseHandler):
 
         yield self.replication_layer.send_pdu(new_pdu)
 
-        defer.returnValue([
+        auth_chain = yield self.store.get_auth_chain(event.event_id)
+        pdu_auth_chain = [
             self.pdu_codec.pdu_from_event(e)
-            for e in event.state_events.values()
-        ])
+            for e in auth_chain
+        ]
+
+        defer.returnValue({
+            "state": [
+                self.pdu_codec.pdu_from_event(e)
+                for e in event.state_events.values()
+            ],
+            "auth_chain": pdu_auth_chain,
+        })
 
     @defer.inlineCallbacks
     def get_state_for_pdu(self, event_id):