* keeps plugin config on reenablement * fixes local config patch on plugin reenablement (cherry picked from commit c9a4092ac0a20351e3c2e0ac0cb593cc28b5bc0e) Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8b7e26fa13
Коммит
bc1a2b34b1
@@ -347,6 +347,11 @@ func patchConfig(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.App.HandleMessageExportConfig(cfg, appCfg)
|
||||
}
|
||||
|
||||
// Treating an empty plugins map as nil preserves the existing configs.
|
||||
if len(cfg.PluginSettings.Plugins) == 0 {
|
||||
cfg.PluginSettings.Plugins = nil
|
||||
}
|
||||
|
||||
updatedCfg, err := config.Merge(appCfg, cfg, &utils.MergeConfig{
|
||||
StructFieldFilter: filterFn,
|
||||
})
|
||||
|
||||
Ссылка в новой задаче
Block a user