mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
feat: add http as sms provider (#8540)
# Which Problems Are Solved Send SMS messages as a HTTP call to a relay, for own logic on handling different SMS providers. # How the Problems Are Solved Add HTTP as SMS provider type and handling of webhook messages in the notification handlers. # Additional Changes Clean up old Twilio events, which were supposed to handle the general SMS providers with deactivate, activate and remove. # Additional Context Partially closes #8270 --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -283,7 +283,7 @@ func (u *userNotifier) reducePasswordCodeAdded(event eventstore.Event) (*handler
|
||||
}
|
||||
notify := types.SendEmail(ctx, u.channels, string(template.Template), translator, notifyUser, colors, e)
|
||||
if e.NotificationType == domain.NotificationTypeSms {
|
||||
notify = types.SendSMSTwilio(ctx, u.channels, translator, notifyUser, colors, e)
|
||||
notify = types.SendSMS(ctx, u.channels, translator, notifyUser, colors, e)
|
||||
}
|
||||
err = notify.SendPasswordCode(ctx, notifyUser, code, e.URLTemplate, e.AuthRequestID)
|
||||
if err != nil {
|
||||
@@ -373,7 +373,7 @@ func (u *userNotifier) reduceOTPSMS(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
notify := types.SendSMSTwilio(ctx, u.channels, translator, notifyUser, colors, event)
|
||||
notify := types.SendSMS(ctx, u.channels, translator, notifyUser, colors, event)
|
||||
err = notify.SendOTPSMSCode(ctx, plainCode, expiry)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -709,7 +709,7 @@ func (u *userNotifier) reducePhoneCodeAdded(event eventstore.Event) (*handler.St
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = types.SendSMSTwilio(ctx, u.channels, translator, notifyUser, colors, e).
|
||||
err = types.SendSMS(ctx, u.channels, translator, notifyUser, colors, e).
|
||||
SendPhoneVerificationCode(ctx, code)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user