5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 08:44:17 +00:00

fix: las actividades se pueden rechazar

This commit is contained in:
f 2024-02-21 13:06:06 -03:00
parent 7b8730c34c
commit e733c45b63
No known key found for this signature in database
2 changed files with 9 additions and 0 deletions

View file

@ -47,6 +47,10 @@ module Api
# Cuando rechazamos una actividad, recibimos la confirmación y
# cambiamos el estado
def onrejected
ActivityPub.transaction do
activity_pub.reject! if activity_pub.waiting?
end
head :accepted
end

View file

@ -53,5 +53,10 @@ class ActivityPub < ApplicationRecord
event :approve do
transitions from: :waiting, to: :approved
end
# La actividad fue rechazada
event :reject do
transitions from: :waiting, to: :rejected
end
end
end