PLT-5765 Passed SiteURL to SendNotifications (#5705)

Этот коммит содержится в:
Harrison Healey
2017-03-10 05:18:18 -05:00
коммит произвёл George Goldberg
родитель 43e5bbea37
Коммит a8e68bd890
35 изменённых файлов: 120 добавлений и 118 удалений

Просмотреть файл

@@ -168,7 +168,7 @@ func removeUserFromChannel(channel *model.Channel, user *model.User, userArg str
CommandPrintErrorln("Can't find user '" + userArg + "'")
return
}
if err := app.RemoveUserFromChannel(user.Id, "", channel); err != nil {
if err := app.RemoveUserFromChannel(user.Id, "", channel, utils.GetSiteURL()); err != nil {
CommandPrintErrorln("Unable to remove '" + userArg + "' from " + channel.Name + ". Error: " + err.Error())
}
}

Просмотреть файл

@@ -274,7 +274,7 @@ func cmdCreateUser() {
}
if team != nil {
err = app.JoinUserToTeam(team, ruser)
err = app.JoinUserToTeam(team, ruser, utils.GetSiteURL())
if err != nil {
l4g.Error("%v", err)
flushLogAndExit(1)
@@ -546,7 +546,7 @@ func cmdLeaveChannel() {
channel = result.Data.(*model.Channel)
}
err := app.RemoveUserFromChannel(user.Id, user.Id, channel)
err := app.RemoveUserFromChannel(user.Id, user.Id, channel, utils.GetSiteURL())
if err != nil {
l4g.Error("%v", err)
flushLogAndExit(1)
@@ -673,7 +673,7 @@ func cmdJoinTeam() {
user = result.Data.(*model.User)
}
err := app.JoinUserToTeam(team, user)
err := app.JoinUserToTeam(team, user, utils.GetSiteURL())
if err != nil {
l4g.Error("%v", err)
flushLogAndExit(1)

Просмотреть файл

@@ -8,6 +8,7 @@ import (
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
"github.com/spf13/cobra"
)
@@ -154,7 +155,7 @@ func addUserToTeam(team *model.Team, user *model.User, userArg string) {
CommandPrintErrorln("Can't find user '" + userArg + "'")
return
}
if err := app.JoinUserToTeam(team, user); err != nil {
if err := app.JoinUserToTeam(team, user, utils.GetSiteURL()); err != nil {
CommandPrintErrorln("Unable to add '" + userArg + "' to " + team.Name)
}
}