From e62d6c6c1d5e03d3b4b6c9c47feefc5d2b186833 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 21 Feb 2024 17:50:06 -0300 Subject: [PATCH] fix: asignar un tipo por defecto para el objeto --- app/controllers/api/v1/webhooks/social_inbox_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/webhooks/social_inbox_controller.rb b/app/controllers/api/v1/webhooks/social_inbox_controller.rb index e6b80c4b..c71c4922 100644 --- a/app/controllers/api/v1/webhooks/social_inbox_controller.rb +++ b/app/controllers/api/v1/webhooks/social_inbox_controller.rb @@ -94,7 +94,10 @@ module Api # # @return [ActivityPub::Object] def object - @object ||= ActivityPub::Object.type_from(original_object).find_or_initialize_by(uri: object_uri).tap do |o| + @object ||= ActivityPub::Object.find_or_initialize_by(uri: object_uri).tap do |o| + # XXX: Si el objeto es una actividad, esto siempre va a ser + # Generic + o.type ||= 'ActivityPub::Object::Generic' o.content = original_object if object_embedded? o.save!