mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add Status.not_direct_visibility scope (#32065)
This commit is contained in:
@@ -130,7 +130,7 @@ class AccountStatusesCleanupPolicy < ApplicationRecord
|
||||
end
|
||||
|
||||
def without_direct_scope
|
||||
Status.where.not(visibility: :direct)
|
||||
Status.not_direct_visibility
|
||||
end
|
||||
|
||||
def old_enough_scope(max_id = nil)
|
||||
|
||||
@@ -127,6 +127,7 @@ class Status < ApplicationRecord
|
||||
}
|
||||
scope :distributable_visibility, -> { where(visibility: %i(public unlisted)) }
|
||||
scope :list_eligible_visibility, -> { where(visibility: %i(public unlisted private)) }
|
||||
scope :not_direct_visibility, -> { where.not(visibility: :direct) }
|
||||
|
||||
after_create_commit :trigger_create_webhooks
|
||||
after_update_commit :trigger_update_webhooks
|
||||
|
||||
Reference in New Issue
Block a user