summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-08-31 04:29:32 +0800
committerJoram Wilander <jwawilander@gmail.com>2017-08-30 16:29:32 -0400
commitf34cd567a6332fe53dae27e6b99b4382505de7a1 (patch)
treee0d32d1fd51930122e8b18408fba5f30a858780c /app/channel.go
parentbb2ca558bb8a015ff850aa3887cbbfdc4e14650d (diff)
downloadchat-f34cd567a6332fe53dae27e6b99b4382505de7a1.tar.gz
chat-f34cd567a6332fe53dae27e6b99b4382505de7a1.tar.bz2
chat-f34cd567a6332fe53dae27e6b99b4382505de7a1.zip
[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
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go7
1 files changed, 7 insertions, 0 deletions
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)