Merge branch 'kb_development' into kb_migration
This commit is contained in:
commit
4c975d32a1
14 changed files with 47 additions and 34 deletions
|
@ -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
|
||||
|
@ -63,7 +62,7 @@ class PublicFeed
|
|||
end
|
||||
|
||||
def media_only?
|
||||
options[:only_media]
|
||||
!local_only? && options[:only_media]
|
||||
end
|
||||
|
||||
def public_scope
|
||||
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue