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

fixup! feat: eliminar más actores

This commit is contained in:
f 2024-03-07 17:46:32 -03:00
parent 2370cf7310
commit 21401d93b6
No known key found for this signature in database

View file

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