5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 08:26:23 +00:00

fix: quizás no hay actor aun (?)

This commit is contained in:
f 2024-03-17 12:06:55 -03:00
parent e8ce721af0
commit 883da8d881
No known key found for this signature in database

View file

@ -9,6 +9,8 @@
# autenticación. # autenticación.
class ActivityPub class ActivityPub
class FetchJob < ApplicationJob class FetchJob < ApplicationJob
include Que::Unique
self.priority = 50 self.priority = 50
def perform(site:, object_id:) def perform(site:, object_id:)
@ -32,7 +34,7 @@ class ActivityPub
return if current_type == object.type return if current_type == object.type
object = ::ActivityPub::Object.find(object_id) object = ::ActivityPub::Object.find(object_id)
object.actor.save if object.actor_type? object.actor&.save if object.actor_type?
# Arreglar las relaciones con actividades también # Arreglar las relaciones con actividades también
ActivityPub.where(object_id: object.id).update_all(object_type: object.type) ActivityPub.where(object_id: object.id).update_all(object_type: object.type)