diff options
author | Richard van der Hoff <richard@matrix.org> | 2015-10-26 18:47:18 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2015-10-26 18:47:18 +0000 |
commit | c79c4f9b146c2e44a26570756f2ecf2e5a6772dc (patch) | |
tree | 1673b27111afdc59bf98bdc92502eb71f37c24e5 /synapse/rest | |
parent | Merge pull request #328 from matrix-org/erikj/search (diff) | |
download | synapse-c79c4f9b146c2e44a26570756f2ecf2e5a6772dc.tar.xz |
Implement full_state incremental sync
A hopefully-complete implementation of the full_state incremental sync, as specced at https://github.com/matrix-org/matrix-doc/pull/133. This actually turns out to be a relatively simple modification to the initial sync implementation.
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/sync.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py index 6c4f2b7cd4..1840eef775 100644 --- a/synapse/rest/client/v2_alpha/sync.py +++ b/synapse/rest/client/v2_alpha/sync.py @@ -16,7 +16,7 @@ from twisted.internet import defer from synapse.http.servlet import ( - RestServlet, parse_string, parse_integer + RestServlet, parse_string, parse_integer, parse_boolean ) from synapse.handlers.sync import SyncConfig from synapse.types import StreamToken @@ -90,6 +90,7 @@ class SyncRestServlet(RestServlet): allowed_values=self.ALLOWED_PRESENCE ) filter_id = parse_string(request, "filter", default=None) + full_state = parse_boolean(request, "full_state", default=False) logger.info( "/sync: user=%r, timeout=%r, since=%r," @@ -120,7 +121,8 @@ class SyncRestServlet(RestServlet): try: sync_result = yield self.sync_handler.wait_for_sync_for_user( - sync_config, since_token=since_token, timeout=timeout + sync_config, since_token=since_token, timeout=timeout, + full_state=full_state ) finally: if set_presence == "online": |