summary refs log tree commit diff
path: root/synapse/federation/federation_client.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 21:07:13 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 22:28:45 +0000
commitad09ee92622e0d37502fb49336f1e1474af458df (patch)
treeb42ac5bc196a7f1cfb8ee71806c1a7dfed5527f3 /synapse/federation/federation_client.py
parentmake FederationClient._try_destination_list async (diff)
downloadsynapse-ad09ee92622e0d37502fb49336f1e1474af458df.tar.xz
make FederationClient.make_membership_event.send_request async
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r--synapse/federation/federation_client.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 11802dad0f..b59d08c4ae 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -471,9 +471,8 @@ class FederationClient(FederationBase):
                 % (membership, ",".join(valid_memberships))
             )
 
-        @defer.inlineCallbacks
-        def send_request(destination):
-            ret = yield self.transport_layer.make_membership_event(
+        async def send_request(destination: str) -> Tuple[str, EventBase, RoomVersion]:
+            ret = await self.transport_layer.make_membership_event(
                 destination, room_id, user_id, membership, params
             )
 
@@ -506,7 +505,7 @@ class FederationClient(FederationBase):
                 event_dict=pdu_dict,
             )
 
-            return (destination, ev, room_version)
+            return destination, ev, room_version
 
         return await self._try_destination_list(
             "make_" + membership, destinations, send_request