When a customer responds to a bot's interactive prompt (input_select, input_csat, form, input_email) from the widget, the response shows up in the Chatwoot agent UI but is not reflected in the linked Slack channel — Slack only ever shows the original question. This happens because the widget submits the answer as an UPDATE to the original message (writing `content_attributes.submitted_values` or `submitted_email`), but the Slack hook only listened to `message.created`, so updates were ignored. Closes https://linear.app/chatwoot/issue/PLA-147 ### Preview <img width="1290" height="1106" alt="CleanShot 2026-04-21 at 13 19 19@2x" src="https://github.com/user-attachments/assets/cd2a9d3f-89d3-4e81-9230-5b078e1b7b44" /> ### How to test 1. Connect a web widget inbox to a Slack channel. 2. Trigger each bot message type (input_select, form, input_csat, input_email) in a conversation. 3. Submit responses from the widget. 4. Verify each response now appears in the Slack thread, appended to the original bot question. --------- Co-authored-by: Muhsin <12408980+muhsin-k@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
22 lines
854 B
Ruby
22 lines
854 B
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe UpdateSlackMessageJob do
|
|
let(:account) { create(:account) }
|
|
let(:hook) { create(:integrations_hook, app_id: 'slack', account: account) }
|
|
let(:message) do
|
|
create(:message, account: account, content: 'Pick one', message_type: :outgoing, content_type: :input_select,
|
|
content_attributes: { items: [{ title: 'Option A', value: 'a' }] })
|
|
end
|
|
|
|
before do
|
|
stub_request(:post, 'https://slack.com/api/chat.update')
|
|
end
|
|
|
|
it 'calls Integrations::Slack::UpdateSlackMessageService' do
|
|
service_instance = Integrations::Slack::UpdateSlackMessageService.new(message: message, hook: hook)
|
|
expect(Integrations::Slack::UpdateSlackMessageService).to receive(:new).with(message: message, hook: hook).and_return(service_instance)
|
|
|
|
described_class.perform_now(message, hook)
|
|
end
|
|
end
|