Remove searchability support from public_feed

This commit is contained in:
KMY 2023-04-07 13:48:44 +09:00
parent 981d4424f5
commit 498dc2ccce

View file

@ -29,7 +29,6 @@ class PublicFeed
scope.merge!(account_filters_scope) if account?
scope.merge!(media_only_scope) if media_only?
scope.merge!(language_scope) if account&.chosen_languages.present?
scope.merge!(public_searchable_scope) if local_only? && !account?
scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
end
@ -98,10 +97,6 @@ class PublicFeed
Status.where(language: account.chosen_languages)
end
def public_searchable_scope
Status.where(searchability: 'public').or(Status.where(searchability: nil).merge(Account.where(searchability: 'public')))
end
def account_filters_scope
Status.not_excluded_by_account(account).tap do |scope|
scope.merge!(Status.not_domain_blocked_by_account(account)) unless local_only?