Этот коммит содержится в:
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 := a.NewEmailTemplate("mfa_change_body", locale)
bodyPage.Props["SiteURL"] = siteURL bodyPage.Props["SiteURL"] = siteURL
bodyText := ""
if activated { 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") bodyPage.Props["Title"] = T("api.templates.mfa_activated_body.title")
} else { } 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.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 { 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) return model.NewAppError("SendMfaChangeEmail", "api.user.send_mfa_change_email.error", nil, err.Error(), http.StatusInternalServerError)
} }

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

@@ -198,7 +198,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch
var user *model.User var user *model.User
if result := <-uchan; result.Err != nil { if result := <-uchan; result.Err != nil {
mlog.Warn("api.email_batching.send_batched_email_notification.user.app_error") mlog.Warn("Unable to find recipient for batched email notification")
return return
} else { } else {
user = result.Data.(*model.User) user = result.Data.(*model.User)

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

@@ -4411,11 +4411,11 @@
"translation": "Invalid MFA token" "translation": "Invalid MFA token"
}, },
{ {
"id": "ent.mfa.activate.save_active.app_erro", "id": "ent.mfa.activate.save_active.app_error",
"translation": "Unable to update MFA active status for the user" "translation": "Unable to update MFA active status for the user"
}, },
{ {
"id": "ent.mfa.deactivate.save_active.app_erro", "id": "ent.mfa.deactivate.save_active.app_error",
"translation": "Unable to update MFA active status for the user" "translation": "Unable to update MFA active status for the user"
}, },
{ {
@@ -6423,7 +6423,7 @@
"translation": "We couldn't get the jobs" "translation": "We couldn't get the jobs"
}, },
{ {
"id": "store.sql_job.get_count_by_status_and_type.app_erro", "id": "store.sql_job.get_count_by_status_and_type.app_error",
"translation": "We couldn't get the job count by status and type" "translation": "We couldn't get the job count by status and type"
}, },
{ {