From f34cd567a6332fe53dae27e6b99b4382505de7a1 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 31 Aug 2017 04:29:32 +0800 Subject: [PLT-5170] Add join the channel system message for the person who created the channel (#7299) * add join the channel system message for the person who created the channel * update test --- app/channel.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index 417659c49..a0684ddc8 100644 --- a/app/channel.go +++ b/app/channel.go @@ -126,6 +126,13 @@ func CreateChannelWithUser(channel *model.Channel, userId string) (*model.Channe return nil, err } + var user *model.User + if user, err = GetUser(userId); err != nil { + return nil, err + } + + postJoinChannelMessage(user, channel) + message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_CREATED, "", "", userId, nil) message.Add("channel_id", channel.Id) message.Add("team_id", channel.TeamId) -- cgit v1.2.3-1-g7c22