Compare commits
1 commit
main
...
fix-accoun
Author | SHA1 | Date | |
---|---|---|---|
|
34a62ff423 |
1 changed files with 14 additions and 4 deletions
|
@ -48,7 +48,17 @@ class AccountSearchService < BaseService
|
||||||
@search_results ||= begin
|
@search_results ||= begin
|
||||||
results = from_elasticsearch if Chewy.enabled?
|
results = from_elasticsearch if Chewy.enabled?
|
||||||
results ||= from_database
|
results ||= from_database
|
||||||
results
|
results.reject { |result| excluded_domains.include?(result.domain) }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def excluded_domains
|
||||||
|
@excluded_domains ||= begin
|
||||||
|
if account
|
||||||
|
Set.new(account.excluded_from_timeline_domains)
|
||||||
|
else
|
||||||
|
Set.new
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue