5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 10:26:21 +00:00

feat: eliminar más actores

This commit is contained in:
f 2024-03-07 17:44:40 -03:00
parent b0b8e6877e
commit 2370cf7310
No known key found for this signature in database

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
# Algunes quedaron como genéricxs
class RemoveActorModerations2 < ActiveRecord::Migration[6.1]
def up
actor_uris = ActivityPub::Activity.where(type: 'ActivityPub::Activity::Delete').distinct.pluck(Arel.sql("content->>'object'"))
actor_ids = ActivityPub::Actor.where(uri: actor_uris).ids
ActorModeration.where(actor_id: actor_ids).remove_all!
end
def down; end
end