summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-30 11:42:09 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-30 11:42:09 +0000
commit8498d348d818aa2d2cb9bb9bb2775103840f355d (patch)
treecd238087e49e49e34dfa4c786411df4adb33f0be /synapse/handlers/sync.py
parentFilter the recent events before applying the limit when doing an initial sync (diff)
downloadsynapse-8498d348d818aa2d2cb9bb9bb2775103840f355d.tar.xz
Fix token formatting
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index b83fcad655..3c68e2a9ec 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -164,7 +164,7 @@ class SyncHandler(BaseHandler):
             A Deferred RoomSyncResult.
         """
 
-        recents, prev_batch_token, limited = self.load_filtered_recents(
+        recents, prev_batch_token, limited = yield self.load_filtered_recents(
             room_id, sync_config, now_token,
         )
 
@@ -288,7 +288,7 @@ class SyncHandler(BaseHandler):
         room_key = now_token.room_key
 
         while limited and len(recents) < sync_config.limit and max_repeat:
-            events, room_key = yield self.store.get_recent_events_for_room(
+            events, (room_key,_) = yield self.store.get_recent_events_for_room(
                 room_id,
                 limit=load_limit + 1,
                 from_token=since_token.room_key if since_token else None,
@@ -326,7 +326,7 @@ class SyncHandler(BaseHandler):
         # the previous sync and this one.
         # TODO(mjark): Check for redactions we might have missed.
 
-        recents, prev_batch_token, limited = self.load_filtered_recents(
+        recents, prev_batch_token, limited = yield self.load_filtered_recents(
             room_id, sync_config, now_token, since_token,
         )