mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 20:47:22 +00:00
fix: sms notification (#2013)
* fix: phone verifications * feat: fix password reset as sms * fix: phone verification
This commit is contained in:
parent
03a38fbf1c
commit
da181b9e8c
@ -40,5 +40,9 @@ func SendPasswordCode(mailhtml string, translator *i18n.Translator, user *view_m
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if code.NotificationType == int32(domain.NotificationTypeSms) {
|
||||
return generateSms(user, passwordResetData.Text, systemDefaults.Notifications, false)
|
||||
}
|
||||
return generateEmail(user, passwordResetData.Subject, template, systemDefaults.Notifications, true)
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ func SendPhoneVerificationCode(translator *i18n.Translator, user *view_model.Not
|
||||
var args = mapNotifyUserToArgs(user)
|
||||
args["Code"] = codeString
|
||||
|
||||
text := translator.Localize(fmt.Sprintf("%s.%s", domain.VerifyPhoneMessageType, domain.MessageTitle), args, user.PreferredLanguage)
|
||||
text := translator.Localize(fmt.Sprintf("%s.%s", domain.VerifyPhoneMessageType, domain.MessageText), args, user.PreferredLanguage)
|
||||
|
||||
codeData := &PhoneVerificationCodeData{UserID: user.ID}
|
||||
template, err := templates.ParseTemplateText(text, codeData)
|
||||
|
Loading…
x
Reference in New Issue
Block a user