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

fix: asignar un tipo por defecto para el objeto

This commit is contained in:
f 2024-02-21 17:50:06 -03:00
parent 7a936c1143
commit e62d6c6c1d
No known key found for this signature in database

View file

@ -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!