0
0
Fork 0

Add scope Status.list_eligible_visibility (#29951)

This commit is contained in:
Matt Jankowski 2024-04-16 05:17:03 -04:00 committed by GitHub
parent e6927db2fe
commit 3159c0a547
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 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 :list_eligible_visibility, -> { where(visibility: %i(public unlisted private)) }
after_create_commit :trigger_create_webhooks
after_update_commit :trigger_update_webhooks