summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-03-10 05:18:18 -0500
committerGeorge Goldberg <george@gberg.me>2017-03-10 10:18:18 +0000
commita8e68bd8905972ae59de90fa33d5b3e3c274dc47 (patch)
treec809d33800262830f2497813fcea2c5bb482ac1b /cmd
parent43e5bbea372cb2c4a98d00fae19cdabd165a8f48 (diff)
downloadchat-a8e68bd8905972ae59de90fa33d5b3e3c274dc47.tar.gz
chat-a8e68bd8905972ae59de90fa33d5b3e3c274dc47.tar.bz2
chat-a8e68bd8905972ae59de90fa33d5b3e3c274dc47.zip
PLT-5765 Passed SiteURL to SendNotifications (#5705)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/platform/channel.go2
-rw-r--r--cmd/platform/oldcommands.go6
-rw-r--r--cmd/platform/team.go3
3 files changed, 6 insertions, 5 deletions
diff --git a/cmd/platform/channel.go b/cmd/platform/channel.go
index b99486242..2510f90f3 100644
--- a/cmd/platform/channel.go
+++ b/cmd/platform/channel.go
@@ -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())
}
}
diff --git a/cmd/platform/oldcommands.go b/cmd/platform/oldcommands.go
index 518dcbaaf..18758cc61 100644
--- a/cmd/platform/oldcommands.go
+++ b/cmd/platform/oldcommands.go
@@ -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)
diff --git a/cmd/platform/team.go b/cmd/platform/team.go
index 1dc5d46eb..6dab2ad16 100644
--- a/cmd/platform/team.go
+++ b/cmd/platform/team.go
@@ -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)
}
}