diff options
author | Chris <ccbrown112@gmail.com> | 2017-11-20 11:57:45 -0600 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-11-20 12:57:45 -0500 |
commit | 5cf45d21559eb4f8c69f57e9d50bcd4d00b9d430 (patch) | |
tree | 87e4513f933e956390dced4c14c766adeac1081f /app/email_batching.go | |
parent | 7eb75093937076df0d7f95ab85b6d10b40383521 (diff) | |
download | chat-5cf45d21559eb4f8c69f57e9d50bcd4d00b9d430.tar.gz chat-5cf45d21559eb4f8c69f57e9d50bcd4d00b9d430.tar.bz2 chat-5cf45d21559eb4f8c69f57e9d50bcd4d00b9d430.zip |
refactor template code (#7860)
Diffstat (limited to 'app/email_batching.go')
-rw-r--r-- | app/email_batching.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/email_batching.go b/app/email_batching.go index 80e0966d5..bdacc65f5 100644 --- a/app/email_batching.go +++ b/app/email_batching.go @@ -236,7 +236,7 @@ func (a *App) sendBatchedEmailNotification(userId string, notifications []*batch "Day": tm.Day(), }) - body := utils.NewHTMLTemplate("post_batched_body", user.Locale) + body := a.NewEmailTemplate("post_batched_body", user.Locale) body.Props["SiteURL"] = *a.Config().ServiceSettings.SiteURL body.Props["Posts"] = template.HTML(contents) body.Props["BodyText"] = translateFunc("api.email_batching.send_batched_email_notification.body_text", len(notifications)) @@ -250,9 +250,9 @@ func (a *App) renderBatchedPost(notification *batchedNotification, channel *mode // don't include message contents if email notification contents type is set to generic var template *utils.HTMLTemplate if emailNotificationContentsType == model.EMAIL_NOTIFICATION_CONTENTS_FULL { - template = utils.NewHTMLTemplate("post_batched_post_full", userLocale) + template = a.NewEmailTemplate("post_batched_post_full", userLocale) } else { - template = utils.NewHTMLTemplate("post_batched_post_generic", userLocale) + template = a.NewEmailTemplate("post_batched_post_generic", userLocale) } template.Props["Button"] = translateFunc("api.email_batching.render_batched_post.go_to_post") |