diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-04-02 03:39:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 03:39:37 +0200 |
commit | c3965e28b3ccc5ed31f37dec598bff646a8fb6d2 (patch) | |
tree | c9621b0debd22197e7b6354970cf51e7851da374 /app/services/search_service.rb | |
parent | 4bf5aeae833ba4b751cd04d67a0697052a14e0ee (diff) |
Fix returning results when searching for URL with non-zero offset (#13377)
Fix #13083
Diffstat (limited to 'app/services/search_service.rb')
-rw-r--r-- | app/services/search_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb index 090fd409b..830de4de3 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -10,10 +10,10 @@ class SearchService < BaseService @resolve = options[:resolve] || false default_results.tap do |results| - next if @query.blank? + next if @query.blank? || @limit.zero? if url_query? - results.merge!(url_resource_results) unless url_resource.nil? || (@options[:type].present? && url_resource_symbol != @options[:type].to_sym) + results.merge!(url_resource_results) unless url_resource.nil? || @offset.positive? || (@options[:type].present? && url_resource_symbol != @options[:type].to_sym) elsif @query.present? results[:accounts] = perform_accounts_search! if account_searchable? results[:statuses] = perform_statuses_search! if full_text_searchable? |