From 67575e59e664b0ed63e78d05ee52fabc6b917b4d Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 9 Oct 2025 11:53:45 +0200 Subject: [PATCH] Fix quote post state sometimes not being updated through streaming server (#36408) --- app/services/activitypub/process_status_update_service.rb | 2 ++ app/workers/activitypub/refetch_and_verify_quote_worker.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/services/activitypub/process_status_update_service.rb b/app/services/activitypub/process_status_update_service.rb index fcc2963e3..b186719c9 100644 --- a/app/services/activitypub/process_status_update_service.rb +++ b/app/services/activitypub/process_status_update_service.rb @@ -74,6 +74,8 @@ class ActivityPub::ProcessStatusUpdateService < BaseService update_quote_approval! update_counts! end + + broadcast_updates! if @status.quote&.state_previously_changed? end def update_interaction_policies! diff --git a/app/workers/activitypub/refetch_and_verify_quote_worker.rb b/app/workers/activitypub/refetch_and_verify_quote_worker.rb index 0c7ecd9b2..e2df02310 100644 --- a/app/workers/activitypub/refetch_and_verify_quote_worker.rb +++ b/app/workers/activitypub/refetch_and_verify_quote_worker.rb @@ -10,6 +10,7 @@ class ActivityPub::RefetchAndVerifyQuoteWorker def perform(quote_id, quoted_uri, options = {}) quote = Quote.find(quote_id) ActivityPub::VerifyQuoteService.new.call(quote, fetchable_quoted_uri: quoted_uri, request_id: options[:request_id]) + ::DistributionWorker.perform_async(quote.status_id, { 'update' => true }) if quote.state_previously_changed? rescue ActiveRecord::RecordNotFound # Do nothing true