Skip to content
Snippets Groups Projects
Commit d7a17b5e authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko
Browse files

Search only from followees (#5897)

parent 34e2a06d
No related branches found
No related tags found
No related merge requests found
......@@ -58,12 +58,16 @@ class AccountSearchService < BaseService
@_domain_is_local ||= TagManager.instance.local_domain?(query_domain)
end
def search_from
options[:following] && account ? account.following : Account
end
def exact_match
@_exact_match ||= begin
if domain_is_local?
Account.find_local(query_username)
search_from.find_local(query_username)
else
Account.find_remote(query_username, query_domain)
search_from.find_remote(query_username, query_domain)
end
end
end
......
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