summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-11-30 04:48:32 -0800
committerJoram Wilander <jwawilander@gmail.com>2016-11-30 07:48:32 -0500
commitd86cdc3f911bf5c20239b88af7af4530283e0e90 (patch)
tree9e22f39c9a9eded83d6cc1f92b97449bebb3bbe8 /store
parente7710cf1d270eefd4d4f42bfe2017baec496b34a (diff)
downloadchat-d86cdc3f911bf5c20239b88af7af4530283e0e90.tar.gz
chat-d86cdc3f911bf5c20239b88af7af4530283e0e90.tar.bz2
chat-d86cdc3f911bf5c20239b88af7af4530283e0e90.zip
PLT-4822 fixing max channels per team (#4675)
Diffstat (limited to 'store')
-rw-r--r--store/sql_channel_store.go2
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
}