mirror of
https://github.com/whippyshou/mastodon
synced 2025-01-22 17:54:07 +09:00
public_feed
This commit is contained in:
parent
bceb739e2a
commit
3ceabfb26a
@ -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
|
||||
|
@ -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 }) }
|
||||
|
@ -25,6 +25,7 @@ Rails.application.routes.draw do
|
||||
/blocks
|
||||
/domain_blocks
|
||||
/mutes
|
||||
/public/local
|
||||
/followed_tags
|
||||
/statuses/(*any)
|
||||
/deck/(*any)
|
||||
|
Loading…
Reference in New Issue
Block a user