mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-18 22:07:32 +00:00
22 lines
516 B
Go
22 lines
516 B
Go
|
package senders
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/zitadel/internal/config/systemdefaults"
|
||
|
"github.com/caos/zitadel/internal/notification/channels"
|
||
|
"github.com/caos/zitadel/internal/notification/channels/twilio"
|
||
|
)
|
||
|
|
||
|
func SMSChannels(config systemdefaults.Notifications) (channels.NotificationChannel, error) {
|
||
|
|
||
|
debug, err := debugChannels(config)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
|
||
|
if !config.DebugMode {
|
||
|
return chainChannels(debug, twilio.InitTwilioChannel(config.Providers.Twilio)), nil
|
||
|
}
|
||
|
|
||
|
return debug, nil
|
||
|
}
|