summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 22:29:49 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 22:29:49 +0000
commitea23210b2dcc75489d9369b13636a56b7449d765 (patch)
treeb8705399e175b15d98e6bb62f5709e59ef7b178e /synapse/federation
parentnewsfile (diff)
downloadsynapse-ea23210b2dcc75489d9369b13636a56b7449d765.tar.xz
make FederationClient.send_invite async
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_client.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 1e9b207a24..51f9b1d8d7 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -659,23 +659,22 @@ class FederationClient(FederationBase):
         # content.
         return resp[1]
 
-    @defer.inlineCallbacks
-    def send_invite(self, destination, room_id, event_id, pdu):
-        room_version = yield self.store.get_room_version_id(room_id)
+    async def send_invite(self, destination, room_id, event_id, pdu):
+        room_version = await self.store.get_room_version_id(room_id)
 
-        content = yield self._do_send_invite(destination, pdu, room_version)
+        content = await self._do_send_invite(destination, pdu, room_version)
 
         pdu_dict = content["event"]
 
         logger.debug("Got response to send_invite: %s", pdu_dict)
 
-        room_version = yield self.store.get_room_version_id(room_id)
+        room_version = await self.store.get_room_version_id(room_id)
         format_ver = room_version_to_event_format(room_version)
 
         pdu = event_from_pdu_json(pdu_dict, format_ver)
 
         # Check signatures are correct.
-        pdu = yield self._check_sigs_and_hash(room_version, pdu)
+        pdu = await self._check_sigs_and_hash(room_version, pdu)
 
         # FIXME: We should handle signature failures more gracefully.