From 5cf45d21559eb4f8c69f57e9d50bcd4d00b9d430 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 20 Nov 2017 11:57:45 -0600 Subject: refactor template code (#7860) --- app/email_batching.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/email_batching.go') 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") -- cgit v1.2.3-1-g7c22