user: search: use get_or_fetch() instead of get_or_fetch_by_nickname()
get_or_fetch() handles the nickname verses URI differences transparently.
This commit is contained in:
parent
56862f4ce1
commit
da44cdd381
@ -731,7 +731,7 @@ def search(query, resolve \\ false, for_user \\ nil) do
|
|||||||
# Strip the beginning @ off if there is a query
|
# Strip the beginning @ off if there is a query
|
||||||
query = String.trim_leading(query, "@")
|
query = String.trim_leading(query, "@")
|
||||||
|
|
||||||
if resolve, do: User.get_or_fetch_by_nickname(query)
|
if resolve, do: get_or_fetch(query)
|
||||||
|
|
||||||
fts_results = do_search(fts_search_subquery(query), for_user)
|
fts_results = do_search(fts_search_subquery(query), for_user)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user