Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Resend Delete activity about suspended accounts
# Run "bundle exec sidekiq -q tmp -c 32" to run in side of main sidekiq jobs to prevent huge latency on push queue
dry_run = 1 # Change this to nil to run actually
inboxes = Account.inboxes
worker =
worker.sidekiq_options_hash['retry'] = 0
worker.sidekiq_options_hash['queue'] = 'tmp'
processed = 0
Account.local.suspended.find_each do |account|
payload =
serializer: ActivityPub::DeleteActorSerializer,
adapter: ActivityPub::Adapter
json = Oj.dump(!(account))
unless dry_run
worker.push_bulk(inboxes) do |inbox_url|
[json,, inbox_url]
processed += 1
p("Queued #{inboxes.size * processed} items into sidekiq for #{processed} accounts")

This comment has been minimized.

Copy link
Owner Author

@tribela tribela commented Sep 25, 2021

As misskey was ignoring remote users' Delete activity, It is not bad for resending Delete activity for deleted accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment