5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 16:46:22 +00:00

fix: guardar el tipo correcto de objeto si lo soportamos

This commit is contained in:
f 2024-03-01 17:14:24 -03:00
parent 9e1bda5570
commit 22f730b805
No known key found for this signature in database

View file

@ -116,7 +116,15 @@ module Api
# 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?
if object_embedded?
o.content = original_object
begin
type = original_object[:type].presence
o.type = "ActivityPub::Object::#{type}".constantize if type
rescue NameError
end
end
o.save!