With literal child porn on the Fediverse today I think it's about time we give admins the ability to delete all content - users and activities - from a remote instance.
The new function
Instance.delete_users_and_activities/1 takes a hostname and schedules a background task to perform this action. It loops through a list of remote users on the instance and deletes each of them using the standard deletion function, which also causes all of their activities and notifications to be deleted.
The new AdminAPI endpoint DELETE
/api/v1/pleroma/admin/instances/:instance calls this function, scheduling a background job to delete all remote content from an instance.
We already have MRF policies that allow us to reject new content from a particular instance, and this finally bridges the gap, allowing us to reject new content and delete all existing content from an instance. In Soapbox FE, I will likely add a "Suspend" button that does both of these actions to an instance at once.
Downstream MR: https://gitlab.com/soapbox-pub/soapbox/-/merge_requests/42