diff --git a/app/jobs/activity_pub/fetch_job.rb b/app/jobs/activity_pub/fetch_job.rb index e0033439..73fc1c9f 100644 --- a/app/jobs/activity_pub/fetch_job.rb +++ b/app/jobs/activity_pub/fetch_job.rb @@ -30,7 +30,9 @@ class ActivityPub current_type = object.type content = FastJsonparser.parse(response.body) - object.lock.update!(content: content, type: ActivityPub::Object.type_from(content).name) + object.with_lock do + object.update!(content: content, type: ActivityPub::Object.type_from(content).name) + end object = ::ActivityPub::Object.find(object_id) # Actualiza la menciĆ³n