mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
aa2a1848da
* feat: add filesystem and stdout notification channels * configure through env vars * compile * feat: add compact option for debug notification channels * fix channel mock generation * avoid sensitive information in error message Co-authored-by: Livio Amstutz <livio.a@gmail.com> * add review improvements Co-authored-by: Livio Amstutz <livio.a@gmail.com>
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
|
|
}
|