summary refs log tree commit diff
path: root/synapse/handlers/search.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-08-01 16:31:40 -0400
committerHubert Chathi <hubert@uhoreg.ca>2019-08-01 16:31:40 -0400
commit336c546d6af5e85d830b6fe7cdc5445f92060b8a (patch)
tree58a4794f7bcabf8c72013365d185f8099666d630 /synapse/handlers/search.py
parentMerge branch 'cross-signing_hidden' into cross-signing_keys (diff)
parentdon't need to return the hidden column any more (diff)
downloadsynapse-336c546d6af5e85d830b6fe7cdc5445f92060b8a.tar.xz
Merge branch 'cross-signing_hidden' into cross-signing_keys
Diffstat (limited to 'synapse/handlers/search.py')
-rw-r--r--synapse/handlers/search.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py
index ddc4430d03..cd5e90bacb 100644
--- a/synapse/handlers/search.py
+++ b/synapse/handlers/search.py
@@ -69,7 +69,7 @@ class SearchHandler(BaseHandler):
             # Scan through the old room for further predecessors
             room_id = predecessor["room_id"]
 
-        defer.returnValue(historical_room_ids)
+        return historical_room_ids
 
     @defer.inlineCallbacks
     def search(self, user, content, batch=None):
@@ -186,13 +186,11 @@ class SearchHandler(BaseHandler):
             room_ids.intersection_update({batch_group_key})
 
         if not room_ids:
-            defer.returnValue(
-                {
-                    "search_categories": {
-                        "room_events": {"results": [], "count": 0, "highlights": []}
-                    }
+            return {
+                "search_categories": {
+                    "room_events": {"results": [], "count": 0, "highlights": []}
                 }
-            )
+            }
 
         rank_map = {}  # event_id -> rank of event
         allowed_events = []
@@ -455,4 +453,4 @@ class SearchHandler(BaseHandler):
         if global_next_batch:
             rooms_cat_res["next_batch"] = global_next_batch
 
-        defer.returnValue({"search_categories": {"room_events": rooms_cat_res}})
+        return {"search_categories": {"room_events": rooms_cat_res}}