Avoid comparing domains when looking for an exact match of a local account (#3336)

This commit is contained in:
happycoloredbanana 2017-05-27 01:55:08 +03:00 committed by Eugen Rochko
parent 3836d293a1
commit 9642601126
2 changed files with 32 additions and 7 deletions

View file

@ -59,7 +59,13 @@ class AccountSearchService < BaseService
end
def exact_match
@_exact_match ||= Account.find_remote(query_username, query_domain)
@_exact_match ||= begin
if domain_is_local?
Account.find_local(query_username)
else
Account.find_remote(query_username, query_domain)
end
end
end
def search_results