diff options
author | happycoloredbanana <happycoloredbanana@users.noreply.github.com> | 2017-05-27 01:55:08 +0300 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-27 00:55:08 +0200 |
commit | 9642601126541347cbf6f49105ba7254e0ab234a (patch) | |
tree | a500f6e9b8d831e5670f37d2cbc3ff143212d1b9 /app | |
parent | 3836d293a155b491299854149a1b3dc5adcd1b7f (diff) |
Avoid comparing domains when looking for an exact match of a local account (#3336)
Diffstat (limited to 'app')
-rw-r--r-- | app/services/account_search_service.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index 04b2ed958..2b77ad7c6 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -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 |