diff options
author | Starfall <us@starfall.systems> | 2020-08-01 10:52:00 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-08-01 10:52:00 -0500 |
commit | 3782a976de9ff4af2fe05690fae43615e78ab14d (patch) | |
tree | 1fd63d4dae153fac802dd4440e4af34d86a30593 /app/services/account_search_service.rb | |
parent | 470aa366b8e58a3adf4e23486e69639b31e41f8c (diff) | |
parent | 7286d5ea48233bd20c3afbdee4cd416e6d34bb80 (diff) |
Merge branch 'mastodon-3.2.0' into main
Diffstat (limited to 'app/services/account_search_service.rb')
-rw-r--r-- | app/services/account_search_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index 493813aab..43e596040 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -27,7 +27,7 @@ class AccountSearchService < BaseService return @exact_match if defined?(@exact_match) - @exact_match = begin + match = begin if options[:resolve] ResolveAccountService.new.call(query) elsif domain_is_local? @@ -36,6 +36,10 @@ class AccountSearchService < BaseService Account.find_remote(query_username, query_domain) end end + + match = nil if !match.nil? && !account.nil? && options[:following] && !account.following?(match) + + @exact_match = match end def search_results |