Fix quote post state sometimes not being updated through streaming server (#36408)
This commit is contained in:
@@ -74,6 +74,8 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||||||
update_quote_approval!
|
update_quote_approval!
|
||||||
update_counts!
|
update_counts!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
broadcast_updates! if @status.quote&.state_previously_changed?
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_interaction_policies!
|
def update_interaction_policies!
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ class ActivityPub::RefetchAndVerifyQuoteWorker
|
|||||||
def perform(quote_id, quoted_uri, options = {})
|
def perform(quote_id, quoted_uri, options = {})
|
||||||
quote = Quote.find(quote_id)
|
quote = Quote.find(quote_id)
|
||||||
ActivityPub::VerifyQuoteService.new.call(quote, fetchable_quoted_uri: quoted_uri, request_id: options[:request_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
|
rescue ActiveRecord::RecordNotFound
|
||||||
# Do nothing
|
# Do nothing
|
||||||
true
|
true
|
||||||
|
|||||||
Reference in New Issue
Block a user