From b334d49654a295b439de085ef0cd0352c7f47645 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 6 Mar 2024 15:41:46 -0300 Subject: [PATCH] fix: actualizar al estado remoto --- app/controllers/api/v1/webhooks/social_inbox_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/webhooks/social_inbox_controller.rb b/app/controllers/api/v1/webhooks/social_inbox_controller.rb index 548781fa..c40857e0 100644 --- a/app/controllers/api/v1/webhooks/social_inbox_controller.rb +++ b/app/controllers/api/v1/webhooks/social_inbox_controller.rb @@ -53,7 +53,8 @@ module Api instance.present? object.present? activity.present? - activity_pub.approve! if activity_pub.may_approve? + activity_pub.update(aasm_state: 'approved') + activity.update_activity_pub_state! end head :accepted @@ -69,7 +70,7 @@ module Api instance.present? object.present? activity.present? - activity_pub.reject! if activity_pub.may_reject? + activity_pub.update(aasm_state: 'rejected') end head :accepted