diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-03-10 05:18:18 -0500 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-10 10:18:18 +0000 |
commit | a8e68bd8905972ae59de90fa33d5b3e3c274dc47 (patch) | |
tree | c809d33800262830f2497813fcea2c5bb482ac1b /api4 | |
parent | 43e5bbea372cb2c4a98d00fae19cdabd165a8f48 (diff) | |
download | chat-a8e68bd8905972ae59de90fa33d5b3e3c274dc47.tar.gz chat-a8e68bd8905972ae59de90fa33d5b3e3c274dc47.tar.bz2 chat-a8e68bd8905972ae59de90fa33d5b3e3c274dc47.zip |
PLT-5765 Passed SiteURL to SendNotifications (#5705)
Diffstat (limited to 'api4')
-rw-r--r-- | api4/apitestlib.go | 2 | ||||
-rw-r--r-- | api4/channel.go | 2 | ||||
-rw-r--r-- | api4/post.go | 3 | ||||
-rw-r--r-- | api4/team.go | 2 | ||||
-rw-r--r-- | api4/user.go | 2 |
5 files changed, 5 insertions, 6 deletions
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 { |