From e3c26a0e89253fb626515831d8468050e6235d89 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 9 Jul 2018 07:25:57 -0700 Subject: Adding ability for plugin system to respect the defaults listed in the plugin manifest. (#9066) --- app/diagnostics.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/diagnostics.go') diff --git a/app/diagnostics.go b/app/diagnostics.go index 601cff27f..abaca691b 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -4,7 +4,6 @@ package app import ( - "encoding/json" "runtime" "github.com/mattermost/mattermost-server/mlog" @@ -98,13 +97,7 @@ func pluginSetting(pluginSettings *model.PluginSettings, plugin, key string, def if !ok { return defaultValue } - var m map[string]interface{} - if b, err := json.Marshal(settings); err != nil { - return defaultValue - } else { - json.Unmarshal(b, &m) - } - if value, ok := m[key]; ok { + if value, ok := settings[key]; ok { return value } return defaultValue -- cgit v1.2.3-1-g7c22