Add optional delete_media parameter to DELETE /api/v1/statuses/:id (#33988)

This commit is contained in:
Claire authored and GitHub committed 2025-02-28 13:39:01 +00:00
1 parent b56e90d049
commit e71fb450e0
3 files changed
+20 -3

No files matched your search

@@ -111,7 +111,7 @@ class Api::V1::StatusesController < Api::BaseController
@status.account.statuses_count = @status.account.statuses_count - 1
json = render_to_body json: @status, serializer: REST::StatusSerializer, source_requested: true
RemovalWorker.perform_async(@status.id, { 'redraft' => true })
RemovalWorker.perform_async(@status.id, { 'redraft' => !truthy_param?(:delete_media) })
render json: json
end