Search left rooms too

pull/307/head
Erik Johnston 2015-10-13 10:36:36 +01:00
parent 1a40afa756
commit 30c2783d2f
1 changed files with 2 additions and 5 deletions

View File

@ -131,12 +131,9 @@ class SearchHandler(BaseHandler):
raise SynapseError(400, "Only one constraint can be FTS") raise SynapseError(400, "Only one constraint can be FTS")
fts = True fts = True
rooms = yield self.store.get_rooms_for_user( rooms = yield self.store.get_rooms_for_user_where_membership_is(
user.to_string(), 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) room_ids = set(r.room_id for r in rooms)
rank_map, event_map = yield self.store.search_msgs(room_ids, constraints) rank_map, event_map = yield self.store.search_msgs(room_ids, constraints)