0
0
Fork 0

Add scope Status.distributable_visibility (#29950)

This commit is contained in:
Matt Jankowski 2024-04-16 09:16:54 -04:00 committed by GitHub
parent 0622107449
commit caad1e2628
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 9 additions and 8 deletions

View file

@ -121,6 +121,7 @@ class Status < ApplicationRecord
scope :tagged_with_none, lambda { |tag_ids|
where('NOT EXISTS (SELECT * FROM statuses_tags forbidden WHERE forbidden.status_id = statuses.id AND forbidden.tag_id IN (?))', tag_ids)
}
scope :distributable_visibility, -> { where(visibility: %i(public unlisted)) }
scope :list_eligible_visibility, -> { where(visibility: %i(public unlisted private)) }
after_create_commit :trigger_create_webhooks