diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-02-03 16:00:46 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-02-03 16:00:46 +0000 |
commit | 957129f4a7febacba64bc68fbcd7375db5156186 (patch) | |
tree | fa1e131c4ffccd15cd9546c069eab90e8e75efb3 /synapse/handlers/federation.py | |
parent | make FederationHandler._update_context_for_auth_events async (diff) | |
download | synapse-957129f4a7febacba64bc68fbcd7375db5156186.tar.xz |
make FederationHandler.construct_auth_difference async
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index ea49f928e5..1d9084b326 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -2425,8 +2425,9 @@ class FederationHandler(BaseHandler): delta_ids=state_updates, ) - @defer.inlineCallbacks - def construct_auth_difference(self, local_auth, remote_auth): + async def construct_auth_difference( + self, local_auth: Iterable[EventBase], remote_auth: Iterable[EventBase] + ) -> Dict: """ Given a local and remote auth chain, find the differences. This assumes that we have already processed all events in remote_auth @@ -2535,7 +2536,7 @@ class FederationHandler(BaseHandler): reason_map = {} for e in base_remote_rejected: - reason = yield self.store.get_rejection_reason(e.event_id) + reason = await self.store.get_rejection_reason(e.event_id) if reason is None: # TODO: e is not in the current state, so we should # construct some proof of that. |