Add unlisted-public tag/circle/list tests
This commit is contained in:
parent
1e62ee4965
commit
258a29ffde
7 changed files with 360 additions and 3 deletions
|
@ -28,7 +28,8 @@ 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!(anonymous_scope) unless account?
|
||||
# scope.merge!(anonymous_scope) unless account?
|
||||
scope = to_anonymous_scope(scope) unless account?
|
||||
|
||||
scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
|
||||
end
|
||||
|
@ -105,6 +106,10 @@ class PublicFeed
|
|||
local_only? ? Status.where(visibility: [:public, :public_unlisted]) : Status.where(visibility: :public)
|
||||
end
|
||||
|
||||
def to_anonymous_scope(scope)
|
||||
scope.where.not(visibility: :login)
|
||||
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