diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-01-10 20:58:22 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-01-10 20:58:22 -0600 |
commit | d6806025a03081d5438f60c6876a6ad1aad97494 (patch) | |
tree | d5969cdc610cdfd73ccc8b59a55892d109cec5ba /app | |
parent | 1e329a7d7254c02cc4a9e6d2b717318d32c25669 (diff) |
avoid double-filtering on search
Diffstat (limited to 'app')
-rw-r--r-- | app/services/search_service.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb index ff6cc2197..73ff785c9 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -24,11 +24,6 @@ class SearchService < BaseService def search_for results = Status.search_for(@query.gsub(/\A#/, ''), @account, @limit, @offset) - return results if results.empty? - account_ids = results.pluck(:account_id) - account_domains = results.map(&:account_domain) - preloaded_relations = relations_map_for_account(@account, account_ids, account_domains) - results.reject { |status| StatusFilter.new(status, @account, preloaded_relations).filtered? } end def perform_accounts_search! |