5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-10-07 19:46:57 +00:00

fix: cargar el objeto por id y modificarlo

closes #15775

closes #15773

closes #15772

closes #15771

closes #15770

closes #15767

closes #15766

closes #15765

closes #15764
This commit is contained in:
f 2024-03-19 17:02:19 -03:00
parent 1ef7996ce9
commit eafa6fad37
No known key found for this signature in database

View file

@ -30,9 +30,8 @@ class ActivityPub
current_type = object.type current_type = object.type
content = FastJsonparser.parse(response.body) content = FastJsonparser.parse(response.body)
object.with_lock do # Modificar atómicamente
object.update!(content: content, type: ActivityPub::Object.type_from(content).name) ::ActivityPub::Object.lock.find(object_id).update!(content: content, type: ActivityPub::Object.type_from(content).name)
end
object = ::ActivityPub::Object.find(object_id) object = ::ActivityPub::Object.find(object_id)
# Actualiza la mención # Actualiza la mención