Apps and tags are suggested in global search.

This commit is contained in:
Roland 2023-11-20 11:29:14 -07:00
parent d042b06e8b
commit fdfb8797fe
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
7 changed files with 68 additions and 15 deletions

View file

@ -553,9 +553,11 @@ async def post_search_suggestions(_: Request, body: schema.SearchSuggestionsRequ
channels = sorted(search_channels_by_name(body.search_str), key=lambda i: i.name)
domains = sorted(search_domains_by_name(body.search_str), key=lambda i: i.domain)
tags_ = tags.search_tags_by_name(body.search_str)
ret = dict(
channels=channels,
domains=domains,
tags=tags_,
)
return json_response(ret)