summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/channel.go b/app/channel.go
index ee53ace45..3e794a0c9 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -218,7 +218,7 @@ func WaitForChannelMembership(channelId string, userId string) {
}
}
-func CreateGroupChannel(userIds []string) (*model.Channel, *model.AppError) {
+func CreateGroupChannel(userIds []string, creatorId string) (*model.Channel, *model.AppError) {
if len(userIds) > model.CHANNEL_GROUP_MAX_USERS || len(userIds) < model.CHANNEL_GROUP_MIN_USERS {
return nil, model.NewAppError("CreateGroupChannel", "api.channel.create_group.bad_size.app_error", nil, "", http.StatusBadRequest)
}
@@ -261,6 +261,10 @@ func CreateGroupChannel(userIds []string) (*model.Channel, *model.AppError) {
return nil, result.Err
}
+ if user.Id == creatorId {
+ WaitForChannelMembership(group.Id, creatorId)
+ }
+
InvalidateCacheForUser(user.Id)
}