summary refs log tree commit diff
path: root/synapse/federation/replication.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-10-16 16:56:51 +0100
committerErik Johnston <erik@matrix.org>2014-10-16 16:56:51 +0100
commit1116f5330ec80533954026f67018e0db190cbae0 (patch)
tree6f559db890c6940b431c8aacb0836a24f0dbcf6e /synapse/federation/replication.py
parentBegin making auth use event.old_state_events (diff)
downloadsynapse-1116f5330ec80533954026f67018e0db190cbae0.tar.xz
Start implementing the invite/join dance. Continue moving auth to use event.state_events
Diffstat (limited to 'synapse/federation/replication.py')
-rw-r--r--synapse/federation/replication.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 2346d55045..08c29dece5 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -393,9 +393,25 @@ class ReplicationLayer(object):
             response = yield self.query_handlers[query_type](args)
             defer.returnValue((200, response))
         else:
-            defer.returnValue((404, "No handler for Query type '%s'"
-                % (query_type)
-            ))
+            defer.returnValue(
+                (404, "No handler for Query type '%s'" % (query_type, ))
+            )
+
+    def on_make_join_request(self, context, user_id):
+        return self.handler.on_make_join_request(context, user_id)
+
+    @defer.inlineCallbacks
+    def on_send_join_request(self, origin, content):
+        pdu = Pdu(**content)
+        state = yield self.handler.on_send_join_request(origin, pdu)
+        defer.returnValue((200, self._transaction_from_pdus(state).get_dict()))
+
+    def make_join(self, destination, context, user_id):
+        return self.transport_layer.make_join(
+            destination=destination,
+            context=context,
+            user_id=user_id,
+        )
 
     @defer.inlineCallbacks
     @log_function