summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/replication.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 37e7db0536..e358de942e 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -413,7 +413,7 @@ class ReplicationLayer(object):
     @defer.inlineCallbacks
     def on_invite_request(self, origin, content):
         pdu = Pdu(**content)
-        ret_pdu = yield self.handler.on_send_join_request(origin, pdu)
+        ret_pdu = yield self.handler.on_invite_request(origin, pdu)
         defer.returnValue((200, ret_pdu.get_dict()))
 
     @defer.inlineCallbacks
@@ -460,6 +460,19 @@ class ReplicationLayer(object):
 
         defer.returnValue(state)
 
+    @defer.inlineCallbacks
+    def send_invite(self, destination, context, event_id, pdu):
+        code, pdu_dict = yield self.transport_layer.send_invite(
+            destination=destination,
+            context=context,
+            event_id=event_id,
+            content=pdu.get_dict(),
+        )
+
+        logger.debug("Got response to send_invite: %s", pdu_dict)
+
+        defer.returnValue(Pdu(**pdu_dict))
+
     @log_function
     def _get_persisted_pdu(self, event_id):
         """ Get a PDU from the database with given origin and id.