5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 06:36:22 +00:00

fix: no completar el contenido si el objeto tiene actividades canceladas

This commit is contained in:
f 2024-02-21 17:08:11 -03:00
parent fc7c2e5b74
commit dca266714d
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -11,6 +11,8 @@ class ActivityPub
class FetchJob < ApplicationJob
def perform(site:, object:)
ActivityPub::Object.transaction do
return if object.activity_pubs.where(aasm_state: 'removed').count.positive?
response = site.social_inbox.dereferencer.get(uri: object.uri)
# @todo Fallar cuando la respuesta no funcione?

View file

@ -38,8 +38,6 @@ class ActivityPub < ApplicationRecord
event :remove do
transitions to: :removed
# @todo Es posible que haya un ActivityPub::FetchJob pendiente
# cuando estamos haciendo esto, que rellene el objeto después.
before do
object.update(content: {}) unless object.content.empty?
end