[MM-47542] Extend Plugin API (#21446)
* Extend Plugin API * Use Error, NoError in tests * Address suggestions * Simplify code * Add new line * Add featureflag and GetCollectionMetadataByIds hook * Add enter at the end of file * make build-templates * Fix test * Fix GetCollectionMetadataByIds ret type * Add GetTopicMetadataByIds hook * Add log * Extract i18n * Add experimental notice on hooks * Update model/feature_flags.go * Swap user to userId * Change userId to userID Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cc69c917f2
Коммит
b8da473da7
@@ -486,6 +486,11 @@ func (a *App) DisablePlugin(id string) *model.AppError {
|
||||
}
|
||||
|
||||
func (ch *Channels) disablePlugin(id string) *model.AppError {
|
||||
for _, collectionType := range ch.collectionTypes[id] {
|
||||
delete(ch.topicTypes, collectionType)
|
||||
}
|
||||
delete(ch.collectionTypes, id)
|
||||
|
||||
pluginsEnvironment := ch.GetPluginsEnvironment()
|
||||
if pluginsEnvironment == nil {
|
||||
return model.NewAppError("DisablePlugin", "app.plugin.disabled.app_error", nil, "", http.StatusNotImplemented)
|
||||
|
||||
Ссылка в новой задаче
Block a user