mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-21 03:44:05 +01:00
make FederationClient.get_event_auth async
This commit is contained in:
parent
d73683c363
commit
24d814ca23
1 changed files with 4 additions and 6 deletions
|
@ -330,19 +330,17 @@ class FederationClient(FederationBase):
|
||||||
|
|
||||||
return state_event_ids, auth_event_ids
|
return state_event_ids, auth_event_ids
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
async def get_event_auth(self, destination, room_id, event_id):
|
||||||
@log_function
|
res = await self.transport_layer.get_event_auth(destination, room_id, event_id)
|
||||||
def get_event_auth(self, destination, room_id, event_id):
|
|
||||||
res = yield 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)
|
format_ver = room_version_to_event_format(room_version)
|
||||||
|
|
||||||
auth_chain = [
|
auth_chain = [
|
||||||
event_from_pdu_json(p, format_ver, outlier=True) for p in res["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
|
destination, auth_chain, outlier=True, room_version=room_version
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue