refactor max channels per team enforcement (#7690)

Этот коммит содержится в:
Chris
2017-10-20 17:33:20 -07:00
коммит произвёл Joram Wilander
родитель 812f566401
Коммит d39a722a81
9 изменённых файлов: 123 добавлений и 106 удалений

Просмотреть файл

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