mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 14:34:47 -04:00
Make search API honour limit set in filter
This commit is contained in:
parent
5d80dad99e
commit
f6e6f3d87a
1 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,9 @@ class SearchHandler(BaseHandler):
|
||||||
user.to_string(), filtered_events
|
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:
|
if event_context is not None:
|
||||||
now_token = yield self.hs.get_event_sources().get_current_token()
|
now_token = yield self.hs.get_event_sources().get_current_token()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue