summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/email.go7
-rw-r--r--app/email_batching.go2
2 files changed, 3 insertions, 6 deletions
diff --git a/app/email.go b/app/email.go
index 206c48aaa..b4e0a8983 100644
--- a/app/email.go
+++ b/app/email.go
@@ -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)
}
diff --git a/app/email_batching.go b/app/email_batching.go
index e75979bca..aad1eb8cb 100644
--- a/app/email_batching.go
+++ b/app/email_batching.go
@@ -198,7 +198,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch
var user *model.User
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
} else {
user = result.Data.(*model.User)