Add force CW action button on moderatoring statuses

This commit is contained in:
KMY 2023-07-06 21:12:53 +09:00
parent 8837193537
commit a6a68a548f
8 changed files with 64 additions and 3 deletions

View file

@ -29,6 +29,8 @@ class ApproveAppealService < BaseService
undo_delete_statuses!
when 'mark_statuses_as_sensitive'
undo_mark_statuses_as_sensitive!
when 'force_cw'
undo_force_cw!
when 'sensitive'
undo_sensitive!
when 'silence'
@ -58,6 +60,13 @@ class ApproveAppealService < BaseService
end
end
def undo_force_cw!
representative_account = Account.representative
@strike.statuses.includes(:media_attachments).each do |status|
UpdateStatusService.new.call(status, representative_account.id, spoiler_text: '')
end
end
def undo_sensitive!
target_account.unsensitize!
end