From bf24f51c4e1cc6286885460672f7f449e8c6f5ef Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 16 Apr 2018 14:23:58 +0200 Subject: [MM-9904] Add /invite slash command to invite users to a channel (#8482) * [MM-9904] Add /invite slash command to invite users to a channel * Update en.json --- app/apptestlib.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/apptestlib.go') diff --git a/app/apptestlib.go b/app/apptestlib.go index 6c2273c6e..1b22831c9 100644 --- a/app/apptestlib.go +++ b/app/apptestlib.go @@ -218,6 +218,20 @@ func (me *TestHelper) createChannel(team *model.Team, channelType string) *model return channel } +func (me *TestHelper) CreateDmChannel(user *model.User) *model.Channel { + utils.DisableDebugLogForTest() + var err *model.AppError + var channel *model.Channel + if channel, err = me.App.CreateDirectChannel(me.BasicUser.Id, user.Id); err != nil { + l4g.Error(err.Error()) + l4g.Close() + time.Sleep(time.Second) + panic(err) + } + utils.EnableDebugLogForTest() + return channel +} + func (me *TestHelper) CreatePost(channel *model.Channel) *model.Post { id := model.NewId() -- cgit v1.2.3-1-g7c22