diff options
Diffstat (limited to 'store/sql_channel_store.go')
-rw-r--r-- | store/sql_channel_store.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go index 4c3eff6e2..89fb8c409 100644 --- a/store/sql_channel_store.go +++ b/store/sql_channel_store.go @@ -196,7 +196,7 @@ func (s SqlChannelStore) saveChannelT(transaction *gorp.Transaction, channel *mo if count, err := transaction.SelectInt("SELECT COUNT(0) FROM Channels WHERE TeamId = :TeamId AND DeleteAt = 0 AND (Type = 'O' OR Type = 'P')", map[string]interface{}{"TeamId": channel.TeamId}); err != nil { result.Err = model.NewLocAppError("SqlChannelStore.Save", "store.sql_channel.save_channel.current_count.app_error", nil, "teamId="+channel.TeamId+", "+err.Error()) return result - } else if count > 20000 { + } else if count > *utils.Cfg.TeamSettings.MaxChannelsPerTeam { result.Err = model.NewLocAppError("SqlChannelStore.Save", "store.sql_channel.save_channel.limit.app_error", nil, "teamId="+channel.TeamId) return result } |