mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-06 14:48:56 +01:00
Rename
This commit is contained in:
parent
fb0fecd0b9
commit
2980136d75
1 changed files with 3 additions and 3 deletions
|
@ -54,7 +54,7 @@ class SearchHandler(BaseHandler):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise SynapseError(400, "Invalid search query")
|
raise SynapseError(400, "Invalid search query")
|
||||||
|
|
||||||
filtr = Filter(filter_dict)
|
search_filter = Filter(filter_dict)
|
||||||
|
|
||||||
# TODO: Search through left rooms too
|
# TODO: Search through left rooms too
|
||||||
rooms = yield self.store.get_rooms_for_user_where_membership_is(
|
rooms = yield self.store.get_rooms_for_user_where_membership_is(
|
||||||
|
@ -64,13 +64,13 @@ class SearchHandler(BaseHandler):
|
||||||
)
|
)
|
||||||
room_ids = set(r.room_id for r in rooms)
|
room_ids = set(r.room_id for r in rooms)
|
||||||
|
|
||||||
room_ids = filtr.filter_rooms(room_ids)
|
room_ids = search_filter.filter_rooms(room_ids)
|
||||||
|
|
||||||
rank_map, event_map, _ = yield self.store.search_msgs(
|
rank_map, event_map, _ = yield self.store.search_msgs(
|
||||||
room_ids, search_term, keys
|
room_ids, search_term, keys
|
||||||
)
|
)
|
||||||
|
|
||||||
filtered_events = filtr.filter(event_map.values())
|
filtered_events = search_filter.filter(event_map.values())
|
||||||
|
|
||||||
allowed_events = yield self._filter_events_for_client(
|
allowed_events = yield self._filter_events_for_client(
|
||||||
user.to_string(), filtered_events
|
user.to_string(), filtered_events
|
||||||
|
|
Loading…
Reference in a new issue