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

fix: aprobar la actividad, no el objeto

This commit is contained in:
f 2024-03-14 17:08:55 -03:00
parent d92953e5fa
commit 1e44fba4b3
No known key found for this signature in database

View file

@ -101,11 +101,14 @@ class ActivityPub < ApplicationRecord
# Definir eventos en masa # Definir eventos en masa
include AasmEventsConcern 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! 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 end
def allow_remotely! 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
end end