summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2015-11-12 16:34:42 +0000
committerRichard van der Hoff <richard@matrix.org>2015-11-13 10:35:01 +0000
commit5ab4b0afe8b5126213cab2be7c3700eb7dd49789 (patch)
tree52f0309698885542a396d0b4e4addfe203222f97 /synapse/rest
parentUpdate some comments (diff)
downloadsynapse-5ab4b0afe8b5126213cab2be7c3700eb7dd49789.tar.xz
Make handlers.sync return a state dictionary, instead of an event list.
Basically this moves the process of flattening the existing dictionary into a
list up to rest.client.*, instead of doing it in handlers.sync. This simplifies
a bit of the code in handlers.sync, but it is also going to be somewhat
beneficial in the next stage of my hacking on SPEC-254.

Merged from PR #371
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/sync.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py
index 997a61abbb..272a00bc85 100644
--- a/synapse/rest/client/v2_alpha/sync.py
+++ b/synapse/rest/client/v2_alpha/sync.py
@@ -256,7 +256,7 @@ class SyncRestServlet(RestServlet):
         :rtype: dict[str, object]
         """
         event_map = {}
-        state_events = filter.filter_room_state(room.state)
+        state_events = filter.filter_room_state(room.state.values())
         state_event_ids = []
         for event in state_events:
             # TODO(mjark): Respect formatting requirements in the filter.