diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-12-05 21:00:43 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-12-05 21:00:43 +0000 |
commit | e126d83f7401456152e07042f8e8b7587adfe1b4 (patch) | |
tree | fc1a5fcabb0c4094166070cfd5d802cf2cd35546 /synapse/rest/client/v1/initial_sync.py | |
parent | Merge branch 'develop' into babolivier/msc1802 (diff) | |
parent | Replace /admin/v1/users_paginate endpoint with /admin/v2/users (#5925) (diff) | |
download | synapse-e126d83f7401456152e07042f8e8b7587adfe1b4.tar.xz |
Merge branch 'develop' into babolivier/msc1802
Diffstat (limited to 'synapse/rest/client/v1/initial_sync.py')
-rw-r--r-- | synapse/rest/client/v1/initial_sync.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/rest/client/v1/initial_sync.py b/synapse/rest/client/v1/initial_sync.py index 2da3cd7511..910b3b4eeb 100644 --- a/synapse/rest/client/v1/initial_sync.py +++ b/synapse/rest/client/v1/initial_sync.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from twisted.internet import defer from synapse.http.servlet import RestServlet, parse_boolean from synapse.rest.client.v2_alpha._base import client_patterns @@ -29,13 +28,12 @@ class InitialSyncRestServlet(RestServlet): self.initial_sync_handler = hs.get_initial_sync_handler() self.auth = hs.get_auth() - @defer.inlineCallbacks - def on_GET(self, request): - requester = yield self.auth.get_user_by_req(request) + async def on_GET(self, request): + requester = await self.auth.get_user_by_req(request) as_client_event = b"raw" not in request.args pagination_config = PaginationConfig.from_request(request) include_archived = parse_boolean(request, "archived", default=False) - content = yield self.initial_sync_handler.snapshot_all_rooms( + content = await self.initial_sync_handler.snapshot_all_rooms( user_id=requester.user.to_string(), pagin_config=pagination_config, as_client_event=as_client_event, |