Этот коммит содержится в:
Giorgi Bochorishvili
2022-12-29 13:38:38 +04:00
родитель 376d134290
Коммит a57beb229c
5 изменённых файлов: 12 добавлений и 2 удалений

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

@@ -241,6 +241,8 @@ func NewChannels(services map[product.ServiceKey]any) (*Channels, error) {
services[product.CommandKey] = &App{ch: ch}
services[product.ThreadsKey] = &App{ch: ch}
return ch, nil
}

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

@@ -10,7 +10,7 @@ import (
"github.com/mattermost/mattermost-server/v6/shared/mlog"
)
func (a *App) registerCollectionAndTopic(pluginID, collectionType, topicType string) error {
func (a *App) RegisterCollectionAndTopic(pluginID, collectionType, topicType string) error {
// we have a race condition due to multiple plugins calling this method
a.ch.collectionAndTopicTypesMut.Lock()
defer a.ch.collectionAndTopicTypesMut.Unlock()

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

@@ -1235,7 +1235,7 @@ func (api *PluginAPI) GetCloudLimits() (*model.ProductLimits, error) {
// RegisterCollectionAndTopic informs the server that this plugin handles
// the given collection and topic types.
func (api *PluginAPI) RegisterCollectionAndTopic(collectionType, topicType string) error {
return api.app.registerCollectionAndTopic(api.id, collectionType, topicType)
return api.app.RegisterCollectionAndTopic(api.id, collectionType, topicType)
}
func (api *PluginAPI) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, error) {