Fix: 投稿にNGワードが含まれる場合、投稿のモデレーションができなくなる場合がある問題 (#685)

This commit is contained in:
KMY(雪あすか) 2024-04-01 08:54:16 +09:00 committed by GitHub
parent 4a9f549dd2
commit e7aececf5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 8 deletions

View file

@ -56,14 +56,14 @@ class ApproveAppealService < BaseService
def undo_mark_statuses_as_sensitive!
representative_account = Account.representative
@strike.statuses.includes(:media_attachments).find_each do |status|
UpdateStatusService.new.call(status, representative_account.id, sensitive: false) if status.with_media?
UpdateStatusService.new.call(status, representative_account.id, sensitive: false, bypass_validation: true) if status.with_media?
end
end
def undo_force_cw!
representative_account = Account.representative
@strike.statuses.includes(:media_attachments).find_each do |status|
UpdateStatusService.new.call(status, representative_account.id, spoiler_text: '')
UpdateStatusService.new.call(status, representative_account.id, spoiler_text: '', bypass_validation: true) if status.spoiler_text.present?
end
end