mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 15:46:22 +00:00
Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
e53d2e474c
1 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ class ActivityPub
|
||||||
# Al generar una excepción, en lugar de seguir intentando, enviamos
|
# Al generar una excepción, en lugar de seguir intentando, enviamos
|
||||||
# el reporte.
|
# el reporte.
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
ExceptionNotifier.notify_exception(e, data: { site: site.name, activity: original_activity })
|
ExceptionNotifier.notify_exception(e, data: { site: site.name, body: body, initial_state: initial_state, activity: original_activity, message: 'Esta acción se canceló automáticamente, para regenerarla, volver a correr el proceso con los mismos parámetros.' })
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -66,7 +66,7 @@ class ActivityPub
|
||||||
@object ||= ::ActivityPub::Object.lock.find_or_initialize_by(uri: object_uri).tap do |o|
|
@object ||= ::ActivityPub::Object.lock.find_or_initialize_by(uri: object_uri).tap do |o|
|
||||||
o.content = original_object if object_embedded?
|
o.content = original_object if object_embedded?
|
||||||
|
|
||||||
o.lock!
|
o.lock! if o.persisted?
|
||||||
o.save!
|
o.save!
|
||||||
|
|
||||||
# XXX: el objeto necesita ser guardado antes de poder
|
# XXX: el objeto necesita ser guardado antes de poder
|
||||||
|
@ -96,7 +96,7 @@ class ActivityPub
|
||||||
.find_or_initialize_by(uri: original_activity[:id], activity_pub: activity_pub, actor: actor).tap do |a|
|
.find_or_initialize_by(uri: original_activity[:id], activity_pub: activity_pub, actor: actor).tap do |a|
|
||||||
a.content = original_activity.dup
|
a.content = original_activity.dup
|
||||||
a.content[:object] = object.uri
|
a.content[:object] = object.uri
|
||||||
a.lock!
|
a.lock! if o.persisted?
|
||||||
a.save!
|
a.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -115,7 +115,7 @@ class ActivityPub
|
||||||
|
|
||||||
site.instance_moderations.lock.find_or_create_by(instance: a.instance)
|
site.instance_moderations.lock.find_or_create_by(instance: a.instance)
|
||||||
|
|
||||||
a.lock!
|
a.lock! if o.persisted?
|
||||||
a.save!
|
a.save!
|
||||||
|
|
||||||
site.actor_moderations.lock.find_or_create_by(actor: a)
|
site.actor_moderations.lock.find_or_create_by(actor: a)
|
||||||
|
|
Loading…
Reference in a new issue