feat: Send MMS through Twilio Inbox (#2959)
Send MMS message to customer for Twilio integration inbox. Fixes #2311
This commit is contained in:
@@ -229,7 +229,8 @@ export default {
|
||||
this.isAFacebookInbox ||
|
||||
this.isATwilioWhatsappChannel ||
|
||||
this.isAPIInbox ||
|
||||
this.isAnEmailChannel
|
||||
this.isAnEmailChannel ||
|
||||
this.isATwilioSMSChannel
|
||||
);
|
||||
},
|
||||
replyButtonLabel() {
|
||||
|
||||
@@ -6,7 +6,11 @@ class Twilio::SendOnTwilioService < Base::SendOnChannelService
|
||||
end
|
||||
|
||||
def perform_reply
|
||||
twilio_message = client.messages.create(**message_params)
|
||||
begin
|
||||
twilio_message = client.messages.create(**message_params)
|
||||
rescue Twilio::REST::TwilioError => e
|
||||
Rails.logger.info "Twilio Error: #{e.message}"
|
||||
end
|
||||
message.update!(source_id: twilio_message.sid)
|
||||
end
|
||||
|
||||
@@ -16,7 +20,7 @@ class Twilio::SendOnTwilioService < Base::SendOnChannelService
|
||||
from: channel.phone_number,
|
||||
to: contact_inbox.source_id
|
||||
}
|
||||
params[:media_url] = attachments if channel.whatsapp? && message.attachments.present?
|
||||
params[:media_url] = attachments if message.attachments.present?
|
||||
params
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user