Chatwoot/app/controllers/twilio/callback_controller.rb
Pranav Raj S a1a81e3799
Feature: Twilio SMS Channel (#658)
Twilio SMS Channel
Fixes :  #350
2020-04-05 22:11:27 +05:30

29 lines
485 B
Ruby

class Twilio::CallbackController < ApplicationController
def create
::Twilio::IncomingMessageService.new(params: permitted_params).perform
head :no_content
end
private
def permitted_params
params.permit(
:ApiVersion,
:SmsSid,
:From,
:ToState,
:ToZip,
:AccountSid,
:MessageSid,
:FromCountry,
:ToCity,
:FromCity,
:To,
:FromZip,
:Body,
:ToCountry,
:FromState
)
end
end