Fix: slack repeated callback event message for attached files (#4610)
This commit is contained in:
@@ -71,6 +71,18 @@ describe Integrations::Slack::IncomingMessageBuilder do
|
||||
expect(conversation.messages.last.content).to eql('this is test https://chatwoot.com Hey @Sojan Test again')
|
||||
expect(conversation.messages.last.attachments).to be_any
|
||||
end
|
||||
|
||||
it 'ignore message if it is postback of CW attachment message' do
|
||||
expect(hook).not_to eq nil
|
||||
messages_count = conversation.messages.count
|
||||
message_with_attachments[:event][:text] = 'Attached File!'
|
||||
builder = described_class.new(message_with_attachments)
|
||||
|
||||
allow(builder).to receive(:sender).and_return(nil)
|
||||
builder.perform
|
||||
|
||||
expect(conversation.messages.count).to eql(messages_count)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user