diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/channel.go | 4 | ||||
-rw-r--r-- | app/import.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/channel.go b/app/channel.go index 29e2309cf..465f2cc80 100644 --- a/app/channel.go +++ b/app/channel.go @@ -142,7 +142,7 @@ func (a *App) CreateChannelWithUser(channel *model.Channel, userId string) (*mod } func (a *App) CreateChannel(channel *model.Channel, addMember bool) (*model.Channel, *model.AppError) { - if result := <-a.Srv.Store.Channel().Save(channel); result.Err != nil { + if result := <-a.Srv.Store.Channel().Save(channel, *a.Config().TeamSettings.MaxChannelsPerTeam); result.Err != nil { return nil, result.Err } else { sc := result.Data.(*model.Channel) @@ -282,7 +282,7 @@ func (a *App) createGroupChannel(userIds []string, creatorId string) (*model.Cha Type: model.CHANNEL_GROUP, } - if result := <-a.Srv.Store.Channel().Save(group); result.Err != nil { + if result := <-a.Srv.Store.Channel().Save(group, *a.Config().TeamSettings.MaxChannelsPerTeam); result.Err != nil { if result.Err.Id == store.CHANNEL_EXISTS_ERROR { return result.Data.(*model.Channel), result.Err } else { diff --git a/app/import.go b/app/import.go index 217e924b4..d6f2aae91 100644 --- a/app/import.go +++ b/app/import.go @@ -1476,7 +1476,7 @@ func (a *App) OldImportUser(team *model.Team, user *model.User) *model.User { } func (a *App) OldImportChannel(channel *model.Channel) *model.Channel { - if result := <-a.Srv.Store.Channel().Save(channel); result.Err != nil { + if result := <-a.Srv.Store.Channel().Save(channel, *a.Config().TeamSettings.MaxChannelsPerTeam); result.Err != nil { return nil } else { sc := result.Data.(*model.Channel) |