Files
gochat/internal/channel/provider/twilio.go
T
2026-06-04 15:44:48 +08:00

34 lines
1.4 KiB
Go

package provider
// Twilio SMS provider registration.
// Registers the Twilio SMS ChannelProvider with the global channel registry.
// Reference: Chatwoot uses Twilio for SMS + WhatsApp in app/models/channel/twilio_sms.rb
// Our GoChat implementation separates SMS and WhatsApp into distinct channels.
//
// Twilio SMS API: https://www.twilio.com/docs/sms
//
// Unlike simpler providers (Telegram, WebWidget) that can be instantiated with
// no dependencies, TwilioProvider requires service, repository, and pipeline
// wiring that happens in bootstrap.go. This init() registers the provider after
// bootstrap creates it with full dependencies.
//
// The actual provider construction and registration happens in bootstrap.go:
// twilioRepo := twilio.NewRepository(db)
// twilioService := twilio.NewTwilioService(twilioRepo)
// twilioPipeline := twilio.NewIncomingProcessor(twilioService)
// twilioProvider := twilio.NewTwilioProvider(twilioService, twilioRepo, twilioPipeline)
// channel.Register(twilioProvider)
//
// This file exists for import consistency with other channel provider files.
import (
"github.com/gochat/gochat/internal/channel"
)
func init() {
// Twilio SMS provider registration happens in bootstrap.go because
// NewTwilioProvider requires service/repo/pipeline dependencies.
// We declare the channel type constant here for visibility.
_ = channel.ChannelTwilioSMS
}