From 6ad46f2b18a1efadeb5e71cfb75776fbeb32717d Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 4 Sep 2023 18:06:52 +0200 Subject: [PATCH] Send update as status.update --- app/services/fetch_link_card_service.rb | 2 +- spec/services/fetch_link_card_service_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index 743cf6ac852..656654b69b6 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -67,7 +67,7 @@ class FetchLinkCardService < BaseService @status.preview_cards << @card Rails.cache.delete(@status) Trends.links.register(@status) - DistributionWorker.perform_async(@status.id) + DistributionWorker.perform_async(@status.id, { update: true }) end end diff --git a/spec/services/fetch_link_card_service_spec.rb b/spec/services/fetch_link_card_service_spec.rb index 8e0938a4d1c..80870a034d1 100644 --- a/spec/services/fetch_link_card_service_spec.rb +++ b/spec/services/fetch_link_card_service_spec.rb @@ -41,7 +41,7 @@ RSpec.describe FetchLinkCardService, type: :service do end it 'redistributes status' do - expect(DistributionWorker).to have_received(:perform_async).with(status.id) + expect(DistributionWorker).to have_received(:perform_async).with(status.id, { update: true }) end context 'with a local status' do