[MM-48626] Move plugins environment out of Channels (#21730)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-12-21 16:11:57 +03:00
коммит произвёл GitHub
родитель 0ce7c5e3da
Коммит dcf499b51d
40 изменённых файлов: 537 добавлений и 447 удалений

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

@@ -886,7 +886,7 @@ func (api *PluginAPI) DisablePlugin(id string) *model.AppError {
}
func (api *PluginAPI) RemovePlugin(id string) *model.AppError {
return api.app.Channels().RemovePlugin(id)
return api.app.Srv().pluginService.RemovePlugin(id)
}
func (api *PluginAPI) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) {
@@ -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.Srv().pluginService.registerCollectionAndTopic(api.id, collectionType, topicType)
}
func (api *PluginAPI) CreateUploadSession(us *model.UploadSession) (*model.UploadSession, error) {