summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-10 11:04:37 +0000
committerErik Johnston <erik@matrix.org>2015-02-10 11:04:37 +0000
commitc86ebe76736a4cde48cfb3229d894a174c6bd379 (patch)
treeafc236e8ef1bdbd6d0686747b99743661522638e /synapse/handlers/sync.py
parentOops, we do want to defer.return regardless of whether we are caching or not (diff)
parentMerge branch 'release-v0.6.2' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-c86ebe76736a4cde48cfb3229d894a174c6bd379.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
Conflicts:
	synapse/app/homeserver.py
	synapse/state.py
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 439164ae39..5af90cc5d1 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -175,9 +175,10 @@ class SyncHandler(BaseHandler):
             room_id, sync_config, now_token,
         )
 
-        current_state_events = yield self.state_handler.get_current_state(
+        current_state = yield self.state_handler.get_current_state(
             room_id
         )
+        current_state_events = current_state.values()
 
         defer.returnValue(RoomSyncResult(
             room_id=room_id,
@@ -347,9 +348,10 @@ class SyncHandler(BaseHandler):
 
         # TODO(mjark): This seems racy since this isn't being passed a
         # token to indicate what point in the stream this is
-        current_state_events = yield self.state_handler.get_current_state(
+        current_state = yield self.state_handler.get_current_state(
             room_id
         )
+        current_state_events = current_state.values()
 
         state_at_previous_sync = yield self.get_state_at_previous_sync(
             room_id, since_token=since_token
@@ -431,6 +433,7 @@ class SyncHandler(BaseHandler):
                     joined = True
 
         if joined:
-            state_delta = yield self.state_handler.get_current_state(room_id)
+            res = yield self.state_handler.get_current_state(room_id)
+            state_delta = res.values()
 
         defer.returnValue(state_delta)