From 1e44fba4b3b70a033bf7026d12ea2da9c3329be8 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 14 Mar 2024 17:08:55 -0300 Subject: [PATCH] fix: aprobar la actividad, no el objeto --- app/models/activity_pub.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/activity_pub.rb b/app/models/activity_pub.rb index 7453a8c3..bd6c816e 100644 --- a/app/models/activity_pub.rb +++ b/app/models/activity_pub.rb @@ -101,11 +101,14 @@ class ActivityPub < ApplicationRecord # Definir eventos en masa include AasmEventsConcern + # Lo que tenemos que aprobar o rechazar es la Ășltima actividad + # disponible, que segĂșn el scope por defecto, va a ser la primera de + # la lista. def reject_remotely! - raise unless site.social_inbox.inbox.reject(id: object.uri).ok? + raise unless site.social_inbox.inbox.reject(id: activities.first.uri).ok? end def allow_remotely! - raise unless site.social_inbox.inbox.accept(id: object.uri).ok? + raise unless site.social_inbox.inbox.accept(id: activities.first.uri).ok? end end