diff --git a/app/models/public_feed.rb b/app/models/public_feed.rb index c208d6f66..b103aa60e 100644 --- a/app/models/public_feed.rb +++ b/app/models/public_feed.rb @@ -61,7 +61,7 @@ class PublicFeed end def public_scope - Status.with_public_visibility.joins(:account).merge(Account.without_suspended.without_silenced) + Status.with_unlisted_visibility.joins(:account).merge(Account.without_suspended.without_silenced) end def local_only_scope diff --git a/app/models/status.rb b/app/models/status.rb index 30634dc71..0ba557519 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -104,6 +104,7 @@ class Status < ApplicationRecord scope :without_replies, -> { where('statuses.reply = FALSE OR statuses.in_reply_to_account_id = statuses.account_id') } scope :without_reblogs, -> { where(statuses: { reblog_of_id: nil }) } scope :with_public_visibility, -> { where(visibility: :public) } + scope :with_unlisted_visibility, -> { where(visibility: :unlisted) } scope :tagged_with, ->(tag_ids) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag_ids }) } scope :excluding_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced_at: nil }) } scope :including_silenced_accounts, -> { left_outer_joins(:account).where.not(accounts: { silenced_at: nil }) } diff --git a/config/routes.rb b/config/routes.rb index 394321cf9..e12f5dee8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -25,6 +25,7 @@ Rails.application.routes.draw do /blocks /domain_blocks /mutes + /public/local /followed_tags /statuses/(*any) /deck/(*any)