mirror of
https://github.com/whippyshou/mastodon
synced 2024-12-12 13:48:30 +09:00
97192d9a77
The reason for unattaching media instead of removing it is to support delete & redraft functionality, but remote or staff-removed statuses will never be redrafted, so the media should be deleted immediately
12 lines
257 B
Ruby
12 lines
257 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RemovalWorker
|
|
include Sidekiq::Worker
|
|
|
|
def perform(status_id, options = {})
|
|
RemoveStatusService.new.call(Status.find(status_id), **options.symbolize_keys)
|
|
rescue ActiveRecord::RecordNotFound
|
|
true
|
|
end
|
|
end
|