mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-18 20:26:22 +00:00
fix: las actividades se pueden rechazar
This commit is contained in:
parent
7b8730c34c
commit
e733c45b63
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue