From 20c6d6af5042360736d8ebd212da2b99e118ec41 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 12 Mar 2024 14:30:43 -0300 Subject: [PATCH] feat: eliminar todos los comentarios de une actore eliminade --- app/models/actor_moderation.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/actor_moderation.rb b/app/models/actor_moderation.rb index 04c96ac0..783160c7 100644 --- a/app/models/actor_moderation.rb +++ b/app/models/actor_moderation.rb @@ -67,6 +67,10 @@ class ActorModeration < ApplicationRecord # mostrarlo y todas sus actividades. event :remove do transitions to: :removed + + before do + site.activity_pubs.where(actor_id: self.actor_id).remove_all! + end end end