summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-13 10:36:36 +0100
committerErik Johnston <erik@matrix.org>2015-10-13 10:36:36 +0100
commit30c2783d2f2983764738383d73c378ec5dc61279 (patch)
treefe0a42671fa4ab4c0d5187fb64a8c760c703a36e /synapse/handlers
parentAdd sqlite schema (diff)
downloadsynapse-30c2783d2f2983764738383d73c378ec5dc61279.tar.xz
Search left rooms too
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/search.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py
index 49b786dadb..d5c395061c 100644
--- a/synapse/handlers/search.py
+++ b/synapse/handlers/search.py
@@ -131,12 +131,9 @@ class SearchHandler(BaseHandler):
                     raise SynapseError(400, "Only one constraint can be FTS")
                 fts = True
 
-        rooms = yield self.store.get_rooms_for_user(
-            user.to_string(),
+        rooms = yield self.store.get_rooms_for_user_where_membership_is(
+            user.to_string(), membership_list=[Membership.JOIN, Membership.LEAVE],
         )
-
-        # For some reason the list of events contains duplicates
-        # TODO(paul): work out why because I really don't think it should
         room_ids = set(r.room_id for r in rooms)
 
         rank_map, event_map = yield self.store.search_msgs(room_ids, constraints)