Add missing to_json to publish announcement reaction worker (#39685)

This commit is contained in:
Matt Jankowski 2026-07-01 11:09:05 -04:00 committed by Claire
parent 9bd073bf0b
commit 635764b72f
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ class PublishAnnouncementReactionWorker
reaction ||= announcement.announcement_reactions.new(name: name)
payload = InlineRenderer.render(reaction, nil, :reaction).tap { |h| h[:announcement_id] = announcement_id.to_s }
payload = { event: :'announcement.reaction', payload: payload }
payload = { event: :'announcement.reaction', payload: payload }.to_json
FeedManager.instance.with_active_accounts do |account|
redis.publish("timeline:#{account.id}", payload) if redis.exists?("subscribed:timeline:#{account.id}")

View File

@ -17,7 +17,7 @@ RSpec.describe PublishAnnouncementReactionWorker do
worker.perform(announcement.id, name)
expect(redis).to have_received(:publish)
expect(redis).to have_received(:publish).with(include('timeline'), be_a(String))
end
it 'does not send the announcement and name to the service when not subscribed' do