mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 02:26:23 +00:00
fix: asignar un tipo por defecto para el objeto
This commit is contained in:
parent
7a936c1143
commit
e62d6c6c1d
1 changed files with 4 additions and 1 deletions
|
@ -94,7 +94,10 @@ module Api
|
||||||
#
|
#
|
||||||
# @return [ActivityPub::Object]
|
# @return [ActivityPub::Object]
|
||||||
def 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.content = original_object if object_embedded?
|
||||||
|
|
||||||
o.save!
|
o.save!
|
||||||
|
|
Loading…
Reference in a new issue