diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-07-09 07:25:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-09 07:25:57 -0700 |
commit | e3c26a0e89253fb626515831d8468050e6235d89 (patch) | |
tree | e2e79be4a59bbb2ae198ac8c52456f831f452ff1 /app/diagnostics.go | |
parent | b78b216a3c8eb354085f97f33dac5e7661ac9188 (diff) | |
download | chat-e3c26a0e89253fb626515831d8468050e6235d89.tar.gz chat-e3c26a0e89253fb626515831d8468050e6235d89.tar.bz2 chat-e3c26a0e89253fb626515831d8468050e6235d89.zip |
Adding ability for plugin system to respect the defaults listed in the plugin manifest. (#9066)
Diffstat (limited to 'app/diagnostics.go')
-rw-r--r-- | app/diagnostics.go | 9 |
1 files changed, 1 insertions, 8 deletions
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 |