diff options
author | Jonathan <jonfritz@gmail.com> | 2017-10-17 13:21:12 -0400 |
---|---|---|
committer | Chris <ccbrown112@gmail.com> | 2017-10-17 10:21:12 -0700 |
commit | b884c8c4104fc83aa382575df4ea95302506e8f1 (patch) | |
tree | fe1463eb8ce7a98f240395fc79c93ac7edaa6a91 /api4/apitestlib.go | |
parent | 39cc2372695836fdc96059d8b94992b1416f98e1 (diff) | |
download | chat-b884c8c4104fc83aa382575df4ea95302506e8f1.tar.gz chat-b884c8c4104fc83aa382575df4ea95302506e8f1.tar.bz2 chat-b884c8c4104fc83aa382575df4ea95302506e8f1.zip |
PLT-7193: Regression - Custom slash commands don't work in direct or group message channels (#7635)
* No longer overriding specified team id for DMs/GMs, as these types of channels don't belong to a team, and doing so breaks slash commands for them
* Ensured user is on specified team in case of GM/DM, extended test suite
Diffstat (limited to 'api4/apitestlib.go')
-rw-r--r-- | api4/apitestlib.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api4/apitestlib.go b/api4/apitestlib.go index 640f38fe6..d54420f57 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -296,13 +296,17 @@ func (me *TestHelper) CreatePrivateChannel() *model.Channel { } func (me *TestHelper) CreateChannelWithClient(client *model.Client4, channelType string) *model.Channel { + return me.CreateChannelWithClientAndTeam(client, channelType, me.BasicTeam.Id) +} + +func (me *TestHelper) CreateChannelWithClientAndTeam(client *model.Client4, channelType string, teamId string) *model.Channel { id := model.NewId() channel := &model.Channel{ DisplayName: "dn_" + id, Name: GenerateTestChannelName(), Type: channelType, - TeamId: me.BasicTeam.Id, + TeamId: teamId, } utils.DisableDebugLogForTest() |