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

This commit is contained in:
Siyuan Liu
2017-12-14 02:50:07 +08:00
committed by Chris
parent ab30c4daf9
commit c39788b64b

View File

@@ -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,