diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-02-03 20:43:40 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-02-03 22:28:45 +0000 |
commit | 24d814ca238c40fef61c7826d1a9d9f9dd3a144d (patch) | |
tree | e625e3d877207d7a14f405991f9bfb609e428837 /synapse/federation | |
parent | make FederationClient.get_room_state_ids async (diff) | |
download | synapse-24d814ca238c40fef61c7826d1a9d9f9dd3a144d.tar.xz |
make FederationClient.get_event_auth async
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/federation_client.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index c3e556e7d9..1da33a7a64 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -330,19 +330,17 @@ class FederationClient(FederationBase): return state_event_ids, auth_event_ids - @defer.inlineCallbacks - @log_function - def get_event_auth(self, destination, room_id, event_id): - res = yield self.transport_layer.get_event_auth(destination, room_id, event_id) + async def get_event_auth(self, destination, room_id, event_id): + res = await self.transport_layer.get_event_auth(destination, room_id, event_id) - 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) auth_chain = [ event_from_pdu_json(p, format_ver, outlier=True) for p in res["auth_chain"] ] - signed_auth = yield self._check_sigs_and_hash_and_fetch( + signed_auth = await self._check_sigs_and_hash_and_fetch( destination, auth_chain, outlier=True, room_version=room_version ) |