summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2015-10-28 14:04:39 +0000
committerRichard van der Hoff <github@rvanderhoff.org.uk>2015-10-28 14:04:39 +0000
commit234d6f9f3ed04a2221c407930cec6453ad0af7c9 (patch)
tree8c539b62f68091b038d2e8d4bab79515bbaa3e32 /synapse/rest
parentMerge pull request #331 from matrix-org/rav/500_on_missing_sigil (diff)
parentImplement full_state incremental sync (diff)
downloadsynapse-234d6f9f3ed04a2221c407930cec6453ad0af7c9.tar.xz
Merge pull request #332 from matrix-org/rav/full_state_sync
Implement full_state incremental sync
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/sync.py6
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":