feat: Add delivery status for Twilio Channel (#8082)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Muhsin Keloth
2023-10-11 21:17:46 +05:30
committed by GitHub
parent 88de3359a5
commit 0bc20873f6
10 changed files with 224 additions and 9 deletions

View File

@@ -68,7 +68,8 @@ RSpec.describe Channel::TwilioSms do
expect(twilio_messages).to receive(:create).with(
messaging_service_sid: channel.messaging_service_sid,
to: '+15555550111',
body: 'hello world'
body: 'hello world',
status_callback: 'http://localhost:3000/twilio/delivery_status'
).once
channel.send_message(to: '+15555550111', body: 'hello world')
@@ -81,7 +82,8 @@ RSpec.describe Channel::TwilioSms do
expect(twilio_messages).to receive(:create).with(
from: channel.phone_number,
to: '+15555550111',
body: 'hello world'
body: 'hello world',
status_callback: 'http://localhost:3000/twilio/delivery_status'
).once
channel.send_message(to: '+15555550111', body: 'hello world')
@@ -94,7 +96,8 @@ RSpec.describe Channel::TwilioSms do
messaging_service_sid: channel.messaging_service_sid,
to: '+15555550111',
body: 'hello world',
media_url: ['https://example.com/1.jpg']
media_url: ['https://example.com/1.jpg'],
status_callback: 'http://localhost:3000/twilio/delivery_status'
).once
channel.send_message(to: '+15555550111', body: 'hello world', media_url: ['https://example.com/1.jpg'])