Skip to content
Snippets Groups Projects
Commit f6e6f3d8 authored by Erik Johnston's avatar Erik Johnston
Browse files

Make search API honour limit set in filter

parent 5d80dad9
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,9 @@ class SearchHandler(BaseHandler):
user.to_string(), filtered_events
)
allowed_events.sort(key=lambda e: -rank_map[e.event_id])
allowed_events = allowed_events[:search_filter.limit()]
if event_context is not None:
now_token = yield self.hs.get_event_sources().get_current_token()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment