From a8e68bd8905972ae59de90fa33d5b3e3c274dc47 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 10 Mar 2017 05:18:18 -0500 Subject: PLT-5765 Passed SiteURL to SendNotifications (#5705) --- api4/apitestlib.go | 2 +- api4/channel.go | 2 +- api4/post.go | 3 +-- api4/team.go | 2 +- api4/user.go | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'api4') diff --git a/api4/apitestlib.go b/api4/apitestlib.go index 2647f20f6..ffeeb32fa 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -296,7 +296,7 @@ func (me *TestHelper) UpdateActiveUser(user *model.User, active bool) { func LinkUserToTeam(user *model.User, team *model.Team) { utils.DisableDebugLogForTest() - err := app.JoinUserToTeam(team, user) + err := app.JoinUserToTeam(team, user, utils.GetSiteURL()) if err != nil { l4g.Error(err.Error()) l4g.Close() diff --git a/api4/channel.go b/api4/channel.go index 8be522484..8ac6f2b14 100644 --- a/api4/channel.go +++ b/api4/channel.go @@ -298,7 +298,7 @@ func removeChannelMember(c *Context, w http.ResponseWriter, r *http.Request) { return } - if err = app.RemoveUserFromChannel(c.Params.UserId, c.Session.UserId, channel); err != nil { + if err = app.RemoveUserFromChannel(c.Params.UserId, c.Session.UserId, channel, c.GetSiteURL()); err != nil { c.Err = err return } diff --git a/api4/post.go b/api4/post.go index 4632cb6df..a43f2f20f 100644 --- a/api4/post.go +++ b/api4/post.go @@ -45,7 +45,7 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) { post.CreateAt = 0 } - rp, err := app.CreatePostAsUser(post) + rp, err := app.CreatePostAsUser(post, c.GetSiteURL()) if err != nil { c.Err = err return @@ -224,4 +224,3 @@ func getFileInfosForPost(c *Context, w http.ResponseWriter, r *http.Request) { w.Write([]byte(model.FileInfosToJson(infos))) } } - diff --git a/api4/team.go b/api4/team.go index c88c553fb..71046c790 100644 --- a/api4/team.go +++ b/api4/team.go @@ -41,7 +41,7 @@ func createTeam(c *Context, w http.ResponseWriter, r *http.Request) { return } - rteam, err := app.CreateTeamWithUser(team, c.Session.UserId) + rteam, err := app.CreateTeamWithUser(team, c.Session.UserId, c.GetSiteURL()) if err != nil { c.Err = err return diff --git a/api4/user.go b/api4/user.go index 822cd60c4..d2cc1034a 100644 --- a/api4/user.go +++ b/api4/user.go @@ -59,7 +59,7 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) { var ruser *model.User var err *model.AppError if len(hash) > 0 { - ruser, err = app.CreateUserWithHash(user, hash, r.URL.Query().Get("d")) + ruser, err = app.CreateUserWithHash(user, hash, r.URL.Query().Get("d"), c.GetSiteURL()) } else if len(inviteId) > 0 { ruser, err = app.CreateUserWithInviteId(user, inviteId, c.GetSiteURL()) } else { -- cgit v1.2.3-1-g7c22