store/channel_store_categories: check if the category has a valid type (#19880)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7b8a2e89d4
Коммит
27bd16e5f5
@@ -396,6 +396,8 @@ func (s SqlChannelStore) completePopulatingCategoryChannelsT(db dbSelecter, cate
|
||||
sq.Eq{"Channels.Type": []model.ChannelType{model.ChannelTypeOpen, model.ChannelTypePrivate}},
|
||||
sq.Eq{"Channels.TeamId": category.TeamId},
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid category type: %q", category.Type)
|
||||
}
|
||||
|
||||
// A subquery that is true if the channel does not have a SidebarChannel entry for the current user on the current team
|
||||
|
||||
Ссылка в новой задаче
Block a user