summary refs log tree commit diff
path: root/synapse/rest/client/v1/initial_sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-12 11:42:43 +0000
committerErik Johnston <erik@matrix.org>2015-02-12 11:42:43 +0000
commit1ed836cc2b909e0bcd439964173008e9755c4750 (patch)
tree65862dbcf81107332c0c7c65a2eda86eb6afc9ba /synapse/rest/client/v1/initial_sync.py
parentMerge pull request #59 from matrix-org/hotfixes-v0.6.1f (diff)
parentExpand on caching (diff)
downloadsynapse-0.7.0.tar.xz
Merge branch 'release-v0.7.0' of github.com:matrix-org/synapse v0.7.0
Diffstat (limited to '')
-rw-r--r--synapse/rest/client/v1/initial_sync.py (renamed from synapse/rest/initial_sync.py)11
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/rest/initial_sync.py b/synapse/rest/client/v1/initial_sync.py

index a571589581..4a259bba64 100644 --- a/synapse/rest/initial_sync.py +++ b/synapse/rest/client/v1/initial_sync.py
@@ -16,23 +16,26 @@ from twisted.internet import defer from synapse.streams.config import PaginationConfig -from base import RestServlet, client_path_pattern +from base import ClientV1RestServlet, client_path_pattern # TODO: Needs unit testing -class InitialSyncRestServlet(RestServlet): +class InitialSyncRestServlet(ClientV1RestServlet): PATTERN = client_path_pattern("/initialSync$") @defer.inlineCallbacks def on_GET(self, request): - user = yield self.auth.get_user_by_req(request) + user, client = yield self.auth.get_user_by_req(request) with_feedback = "feedback" in request.args + as_client_event = "raw" not in request.args pagination_config = PaginationConfig.from_request(request) handler = self.handlers.message_handler content = yield handler.snapshot_all_rooms( user_id=user.to_string(), pagin_config=pagination_config, - feedback=with_feedback) + feedback=with_feedback, + as_client_event=as_client_event + ) defer.returnValue((200, content))