mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 04:06:21 +00:00
fix: aprobar la actividad, no el objeto
This commit is contained in:
parent
d92953e5fa
commit
1e44fba4b3
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue