summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-21 11:18:09 +0100
committerErik Johnston <erik@matrix.org>2016-06-21 11:18:09 +0100
commit3b6027dbc1302a918df272f9fae7f4cac1ff2685 (patch)
tree3910048c241b90b87c37fb176dda7cc96517389e
parentImplement error responses (diff)
downloadsynapse-3b6027dbc1302a918df272f9fae7f4cac1ff2685.tar.xz
Always include tags
-rw-r--r--synapse/handlers/sync.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py

index 71c3f678de..19ba5fdba4 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py
@@ -747,15 +747,27 @@ class SyncHandler(object): pagination_state=sync_result_builder.pagination_state, ) + all_tags = yield self.store.get_tags_for_user(user_id) + if missing_state: for r in room_entries: if r.room_id in missing_state: + if r.room_id in all_tags: + r.always_include = True + continue r.full_state = True if r.room_id in include_map: r.always_include = True r.events = None r.since_token = None r.upto_token = now_token + elif pagination_config: + all_tags = yield self.store.get_tags_for_user(user_id) + + logger.info("all_tags: %r", all_tags) + for r in room_entries: + if r.room_id in all_tags: + r.always_include = True for room_id in set(include_map.keys()) - {r.room_id for r in room_entries}: sync_result_builder.errors.append(ErrorSyncResult(