MM-32421: Extend channel sidebar category APIs for Plugins (#17821)
* extend plugin api with sidebar functionalities * include generated mocks for tests * bump up version requirements for plugin api * update tag to 'ChannelSidebar' Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a9b3e423e6
Коммит
b4f6cb8cb7
@@ -439,6 +439,18 @@ func (api *PluginAPI) SearchChannels(teamID string, term string) ([]*model.Chann
|
||||
return *channels, err
|
||||
}
|
||||
|
||||
func (api *PluginAPI) CreateChannelSidebarCategory(userID, teamID string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
|
||||
return api.app.CreateSidebarCategory(userID, teamID, newCategory)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannelSidebarCategories(userID, teamID string) (*model.OrderedSidebarCategories, *model.AppError) {
|
||||
return api.app.GetSidebarCategories(userID, teamID)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) UpdateChannelSidebarCategories(userID, teamID string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) {
|
||||
return api.app.UpdateSidebarCategories(userID, teamID, categories)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) SearchUsers(search *model.UserSearch) ([]*model.User, *model.AppError) {
|
||||
pluginSearchUsersOptions := &model.UserSearchOptions{
|
||||
IsAdmin: true,
|
||||
|
||||
Ссылка в новой задаче
Block a user