diff options
author | enahum <nahumhbl@gmail.com> | 2016-11-14 09:11:54 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-11-14 07:11:54 -0500 |
commit | baf1fb6fea7b4afeae7f559f8830bd9493868299 (patch) | |
tree | e6eb90f0c9c3bdef746d15aa5295b379cd6e6d16 /api/post.go | |
parent | 323ce8b203c570ed6a1dd57b44d6637ad8207616 (diff) | |
download | chat-baf1fb6fea7b4afeae7f559f8830bd9493868299.tar.gz chat-baf1fb6fea7b4afeae7f559f8830bd9493868299.tar.bz2 chat-baf1fb6fea7b4afeae7f559f8830bd9493868299.zip |
PLT-4618 Fix email subjects (#4537)
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/api/post.go b/api/post.go index e5e18cb52..f17df8831 100644 --- a/api/post.go +++ b/api/post.go @@ -842,9 +842,7 @@ func sendNotificationEmail(c *Context, post *model.Post, user *model.User, chann "ChannelName": channelName, "Month": month, "Day": day, "Year": year} } - subjectPage := utils.NewHTMLTemplate("post_subject", user.Locale) - subjectPage.Props["Subject"] = userLocale(mailTemplate, mailParameters) - subjectPage.Props["SiteName"] = utils.Cfg.TeamSettings.SiteName + subject := fmt.Sprintf("[%v] %v", utils.Cfg.TeamSettings.SiteName, userLocale(mailTemplate, mailParameters)) bodyPage := utils.NewHTMLTemplate("post_body", user.Locale) bodyPage.Props["SiteURL"] = c.GetSiteURL() @@ -857,7 +855,7 @@ func sendNotificationEmail(c *Context, post *model.Post, user *model.User, chann "Hour": fmt.Sprintf("%02d", tm.Hour()), "Minute": fmt.Sprintf("%02d", tm.Minute()), "TimeZone": zone, "Month": month, "Day": day})) - if err := utils.SendMail(user.Email, html.UnescapeString(subjectPage.Render()), bodyPage.Render()); err != nil { + if err := utils.SendMail(user.Email, html.UnescapeString(subject), bodyPage.Render()); err != nil { l4g.Error(utils.T("api.post.send_notifications_and_forget.send.error"), user.Email, err) } } |