summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorDavid Lu <david.lu@hotmail.com>2016-07-21 09:16:20 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-07-21 09:16:20 -0400
commitf0e9ec2dd127ffe34472c617f978173a8bf60b7c (patch)
treedb5b94ab5a5f975f1c7b011b4e257449b8056080 /api
parentd1de8848451bad5a389ef1e16ee65551386b0327 (diff)
downloadchat-f0e9ec2dd127ffe34472c617f978173a8bf60b7c.tar.gz
chat-f0e9ec2dd127ffe34472c617f978173a8bf60b7c.tar.bz2
chat-f0e9ec2dd127ffe34472c617f978173a8bf60b7c.zip
Fixed /join (#3647)
Diffstat (limited to 'api')
-rw-r--r--api/command_join.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/command_join.go b/api/command_join.go
index a2b1a2ddf..dddba0135 100644
--- a/api/command_join.go
+++ b/api/command_join.go
@@ -45,6 +45,11 @@ func (me *JoinProvider) DoCommand(c *Context, channelId string, message string)
if v.Type != model.CHANNEL_OPEN {
return &model.CommandResponse{Text: c.T("api.command_join.fail.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
}
+
+ if err, _ := JoinChannelById(c, c.Session.UserId, channelId); err != nil {
+ return &model.CommandResponse{Text: c.T("api.command_join.fail.app_error"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
+ }
+
return &model.CommandResponse{GotoLocation: c.GetTeamURL() + "/channels/" + v.Name, Text: c.T("api.command_join.success"), ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL}
}
}