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:
parent
fc7c2e5b74
commit
dca266714d
2 changed files with 2 additions and 2 deletions
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue