Do not auto-join 'off-topic' channel if it is private (#7950)

Этот коммит содержится в:
Siyuan Liu
2017-12-14 02:50:07 +08:00
коммит произвёл Chris
родитель ab30c4daf9
Коммит c39788b64b

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

@@ -78,8 +78,7 @@ func (a *App) JoinDefaultChannels(teamId string, user *model.User, channelRole s
if result := <-a.Srv.Store.Channel().GetByName(teamId, "off-topic", true); result.Err != nil {
err = result.Err
} else {
offTopic := result.Data.(*model.Channel)
} else if offTopic := result.Data.(*model.Channel); offTopic.Type == model.CHANNEL_OPEN {
cm := &model.ChannelMember{
ChannelId: offTopic.Id,