Documentation ¶
Index ¶
Constants ¶
View Source
const ReceivedMessageFeed = "handle_received_message"
ReceivedMessageFeed is the feed name for handling received messages
View Source
const SendSMSFeed = "send_twilio_sms"
SendSMSFeed is the feed name for sending a Twilio SMS message
View Source
const SentMessageFeed = "handle_sent_message"
SentMessageFeed is the feed name for handling sent messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TwilioChat ¶
type TwilioChat struct { Client TwilioClient From string // The Twilio automated number To string // The user sending SMS Channel string // TODO: Should be SMS, MMS, WhatsApp? }
TwilioChat implements the chat.Provider interface for Twilio messaging
func NewTwilioChat ¶
func NewTwilioChat(client TwilioClient, from, to string) *TwilioChat
NewTwilioChat is a constructor for Twilio Chat structs
func (*TwilioChat) CheckSignature ¶
func (*TwilioChat) HandleSMSWebhook ¶
func (c *TwilioChat) HandleSMSWebhook(data gotwilio.SMSWebhook) (chat.Message, error)
HandleSMSWebhook manages incoming SMS webhooks and converts them to chat.Message structs
func (*TwilioChat) SendSMS ¶
func (c *TwilioChat) SendSMS(body string) (*gotwilio.SmsResponse, *gotwilio.Exception, error)
Click to show internal directories.
Click to hide internal directories.