From c39788b64b2d2c1f61968da234cac47c21e1affb Mon Sep 17 00:00:00 2001 From: Siyuan Liu Date: Thu, 14 Dec 2017 02:50:07 +0800 Subject: Do not auto-join 'off-topic' channel if it is private (#7950) --- app/channel.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index 4dc1f349f..d37f681bb 100644 --- a/app/channel.go +++ b/app/channel.go @@ -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, -- cgit v1.2.3-1-g7c22