Add Instance.delete_users_and_activities/1 to delete all content from a remote instance

This commit is contained in:
Alex Gleason 2021-07-17 14:06:35 -05:00
commit f67d00d12b
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 58 additions and 0 deletions

View file

@ -3,6 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.BackgroundWorker do
alias Pleroma.Instances.Instance
alias Pleroma.User
use Pleroma.Workers.WorkerHelper, queue: "background"
@ -38,4 +39,8 @@ defmodule Pleroma.Workers.BackgroundWorker do
Pleroma.FollowingRelationship.move_following(origin, target)
end
def perform(%Job{args: %{"op" => "delete_instance", "host" => host}}) do
Instance.perform(:delete_instance, host)
end
end