diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-02-03 19:15:08 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-02-03 19:15:08 +0000 |
commit | e81c093974faeb8d39dcedcbda7c2e4f5683091f (patch) | |
tree | 1eea0d6d2f53bd3e67b87c01791e6f1ec332729c /synapse/handlers/federation.py | |
parent | changelog (diff) | |
download | synapse-e81c093974faeb8d39dcedcbda7c2e4f5683091f.tar.xz |
make FederationHandler.on_get_missing_events async
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/federation.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index c94573b547..ea2f6a91d7 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -2121,24 +2121,23 @@ class FederationHandler(BaseHandler): return ret - @defer.inlineCallbacks - def on_get_missing_events( + async def on_get_missing_events( self, origin, room_id, earliest_events, latest_events, limit ): - in_room = yield self.auth.check_host_in_room(room_id, origin) + in_room = await self.auth.check_host_in_room(room_id, origin) if not in_room: raise AuthError(403, "Host not in room.") limit = min(limit, 20) - missing_events = yield self.store.get_missing_events( + missing_events = await self.store.get_missing_events( room_id=room_id, earliest_events=earliest_events, latest_events=latest_events, limit=limit, ) - missing_events = yield filter_events_for_server( + missing_events = await filter_events_for_server( self.storage, origin, missing_events ) |