diff --git a/app/lib/potential_friendship_tracker.rb b/app/lib/potential_friendship_tracker.rb index 3e943d71..69b52fea 100644 --- a/app/lib/potential_friendship_tracker.rb +++ b/app/lib/potential_friendship_tracker.rb @@ -31,7 +31,7 @@ class PotentialFriendshipTracker def get(account_id, limit: 10, offset: 0) account_ids = redis.zrevrange("interactions:#{account_id}", offset, limit) return [] if account_ids.empty? - Account.searchable.where(id: account_ids) + Account.searchable.where(id: account_ids).local end end end diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index 7bdffbbd..7eacf87f 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -19,7 +19,7 @@ class AccountSearchService < BaseService return [] if query_blank_or_hashtag? || limit < 1 if resolving_non_matching_remote_account? - [ResolveAccountService.new.call("#{query_username}@#{query_domain}")].compact + return [] else search_results_and_exact_match.compact.uniq.slice(0, limit) end