diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-09-28 15:41:21 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-09-28 15:41:21 -0400 |
commit | 2330ab1a1ef16073e627d7a43bd625d50430b41b (patch) | |
tree | 5921e721ac33699186b8ea70c9b0fc2f23ea4e6a /api/user.go | |
parent | 8df3d8bd41b2b1e412ae66a61c36f9bd8abfca3d (diff) | |
parent | dffa56d4b44a4a2508103491cb889eb21c66411c (diff) | |
download | chat-2330ab1a1ef16073e627d7a43bd625d50430b41b.tar.gz chat-2330ab1a1ef16073e627d7a43bd625d50430b41b.tar.bz2 chat-2330ab1a1ef16073e627d7a43bd625d50430b41b.zip |
Merge pull request #838 from mattermost/email-image-fix
Fix images in welcome email.
Diffstat (limited to 'api/user.go')
-rw-r--r-- | api/user.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go index 9ed4404f1..92a77e68a 100644 --- a/api/user.go +++ b/api/user.go @@ -198,7 +198,7 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User { l4g.Error("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", ruser.Id, ruser.TeamId, err) } - fireAndForgetWelcomeEmail(ruser.Email, team.DisplayName, c.GetTeamURLFromTeam(team)) + fireAndForgetWelcomeEmail(ruser.Email, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team)) if user.EmailVerified { if cresult := <-Srv.Store.User().VerifyEmail(ruser.Id); cresult.Err != nil { l4g.Error("Failed to set email verified err=%v", cresult.Err) @@ -218,12 +218,13 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User { } } -func fireAndForgetWelcomeEmail(email, teamDisplayName, teamURL string) { +func fireAndForgetWelcomeEmail(email, teamDisplayName, siteURL, teamURL string) { go func() { subjectPage := NewServerTemplatePage("welcome_subject") subjectPage.Props["TeamDisplayName"] = teamDisplayName bodyPage := NewServerTemplatePage("welcome_body") + bodyPage.Props["SiteURL"] = siteURL bodyPage.Props["TeamURL"] = teamURL if err := utils.SendMail(email, subjectPage.Render(), bodyPage.Render()); err != nil { |