summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-22 11:02:27 +0100
committerErik Johnston <erik@matrix.org>2016-06-22 11:02:27 +0100
commit839088e2e773ce7835034b6a73566bc31a068e84 (patch)
treeec1e1353d27ff23ceacaa6549c85a6f5f695fd9b
parentAdd tag handling (diff)
downloadsynapse-839088e2e773ce7835034b6a73566bc31a068e84.tar.xz
Support streaming peek
-rw-r--r--synapse/handlers/sync.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 04bb1616c0..625f2f2583 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -779,13 +779,19 @@ class SyncHandler(object):
                         if include_all_tags and r.room_id in all_tags:
                             r.always_include = True
                             continue
-                        r.full_state = True
-                        r.would_require_resync = True
                         if r.room_id in include_map:
-                            r.always_include = True
+                            since = include_map[r.room_id].get("since", None)
+                            r.since_token = since
+                            if not since:
+                                r.always_include = True
+                                r.full_state = True
+                                r.would_require_resync = True
                             r.events = None
-                            r.since_token = None
                             r.upto_token = now_token
+                        else:
+                            r.full_state = True
+                            r.would_require_resync = True
+
         elif pagination_config and include_all_tags:
             all_tags = yield self.store.get_tags_for_user(user_id)