Forward port 3.8.1 changes that missed master (#6362)

Этот коммит содержится в:
Joram Wilander
2017-05-09 16:01:06 -04:00
коммит произвёл GitHub
родитель c8a4a8c6e6
Коммит 8c8d9dbf8f
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@@ -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)
}