Commit da44cdd3 authored by kaniini's avatar kaniini
Browse files

user: search: use get_or_fetch() instead of get_or_fetch_by_nickname()

get_or_fetch() handles the nickname verses URI differences transparently.
parent 56862f4c
......@@ -731,7 +731,7 @@ def search(query, resolve \\ false, for_user \\ nil) do
# Strip the beginning @ off if there is a 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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment