Этот коммит содержится в:
Jesús Espino
2018-06-16 09:35:24 +02:00
коммит произвёл GitHub
родитель e38b18565e
Коммит f48d31c7a4
3 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@@ -232,17 +232,14 @@ func (a *App) SendMfaChangeEmail(email string, activated bool, locale, siteURL s
bodyPage := a.NewEmailTemplate("mfa_change_body", locale)
bodyPage.Props["SiteURL"] = siteURL
bodyText := ""
if activated {
bodyText = "api.templates.mfa_activated_body.info"
bodyPage.Html["Info"] = utils.TranslateAsHtml(T, "api.templates.mfa_activated_body.info", map[string]interface{}{"SiteURL": siteURL})
bodyPage.Props["Title"] = T("api.templates.mfa_activated_body.title")
} else {
bodyText = "api.templates.mfa_deactivated_body.info"
bodyPage.Html["Info"] = utils.TranslateAsHtml(T, "api.templates.mfa_deactivated_body.info", map[string]interface{}{"SiteURL": siteURL})
bodyPage.Props["Title"] = T("api.templates.mfa_deactivated_body.title")
}
bodyPage.Html["Info"] = utils.TranslateAsHtml(T, bodyText, map[string]interface{}{"SiteURL": siteURL})
if err := a.SendMail(email, subject, bodyPage.Render()); err != nil {
return model.NewAppError("SendMfaChangeEmail", "api.user.send_mfa_change_email.error", nil, err.Error(), http.StatusInternalServerError)
}