Updated account search and suggestions to be local only

• Updated:
- account search and suggestions to be local only
This commit is contained in:
mgabdev 2020-05-25 21:05:32 -04:00
parent ec499eb1b8
commit 427cd59996
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class PotentialFriendshipTracker
def get(account_id, limit: 10, offset: 0) def get(account_id, limit: 10, offset: 0)
account_ids = redis.zrevrange("interactions:#{account_id}", offset, limit) account_ids = redis.zrevrange("interactions:#{account_id}", offset, limit)
return [] if account_ids.empty? return [] if account_ids.empty?
Account.searchable.where(id: account_ids) Account.searchable.where(id: account_ids).local
end end
end end
end end

View File

@ -19,7 +19,7 @@ class AccountSearchService < BaseService
return [] if query_blank_or_hashtag? || limit < 1 return [] if query_blank_or_hashtag? || limit < 1
if resolving_non_matching_remote_account? if resolving_non_matching_remote_account?
[ResolveAccountService.new.call("#{query_username}@#{query_domain}")].compact return []
else else
search_results_and_exact_match.compact.uniq.slice(0, limit) search_results_and_exact_match.compact.uniq.slice(0, limit)
end end