keeps plugin config on reenablement (#35545) (#35581)

* 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>
Этот коммит содержится в:
Mattermost Build
2026-03-16 07:01:26 +01:00
коммит произвёл GitHub
родитель 8b7e26fa13
Коммит bc1a2b34b1
3 изменённых файлов: 76 добавлений и 0 удалений

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

@@ -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,
})