summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-12 15:52:55 +0100
committerErik Johnston <erik@matrix.org>2015-10-12 15:52:55 +0100
commitca53ad74250d94b8c9b6581e6cedef0a29520fc2 (patch)
treed72133b73db6b07112ec899353be80cd0aff048c /synapse/storage/search.py
parentMerge remote-tracking branch 'origin/develop' into erikj/search (diff)
downloadsynapse-ca53ad74250d94b8c9b6581e6cedef0a29520fc2.tar.xz
Filter events to only thsoe that the user is allowed to see
Diffstat (limited to '')
-rw-r--r--synapse/storage/search.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index e66b5f9edc..238df38440 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -70,11 +70,11 @@ class SearchStore(SQLBaseStore):
             for ev in events
         }
 
-        defer.returnValue([
+        defer.returnValue((
             {
-                "rank": r["rank"],
-                "result": event_map[r["event_id"]]
-            }
-            for r in results
-            if r["event_id"] in event_map
-        ])
+                r["event_id"]: r["rank"]
+                for r in results
+                if r["event_id"] in event_map
+            },
+            event_map
+        ))