5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 04:16:32 +00:00

fix: primero guardar el objeto antes de obtener su contenido

This commit is contained in:
f 2024-02-21 15:44:16 -03:00
parent 5dbff20e2b
commit ddaee30da7
No known key found for this signature in database

View file

@ -97,13 +97,13 @@ module Api
# @return [ActivityPub::Object]
def object
@object ||= ActivityPub::Object.type_from(original_object).find_or_initialize_by(uri: object_uri).tap do |o|
if object_embedded?
o.content = original_object
else
ActivityPub::FetchJob.perform_later(site: site, object: o)
end
o.content = original_object if object_embedded?
o.save!
# XXX: el objeto necesita ser guardado antes de poder
# procesarlo
ActivityPub::FetchJob.perform_later(site: site, object: o) unless object_embedded?
end
end