mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 01:16:23 +00:00
fix: guardar el tipo correcto de objeto si lo soportamos
This commit is contained in:
parent
9e1bda5570
commit
22f730b805
1 changed files with 9 additions and 1 deletions
|
@ -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!
|
||||
|
||||
|
|
Loading…
Reference in a new issue