From 76310351658b9f0198df93158e3353acff24a1e1 Mon Sep 17 00:00:00 2001 From: Michael Kochell <6913320+mickmister@users.noreply.github.com> Date: Wed, 6 Apr 2022 21:32:56 -0400 Subject: [PATCH] Prepackage Apps plugin and enable Apps feature flag by default (#19870) * prepackage with apps 0.7.0 * fix config comparison test * update apps plugin version to 1.0.0 * remove irrelevant whitespace change * change apps plugin version to 1.0.1 Co-authored-by: Mattermod --- Makefile | 1 + config/diff_test.go | 9 +++++++++ model/config.go | 5 +++++ model/feature_flags.go | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d5e42d380d..ff4adf9954 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,7 @@ PLUGIN_PACKAGES += mattermost-plugin-nps-v1.1.0 PLUGIN_PACKAGES += mattermost-plugin-welcomebot-v1.2.0 PLUGIN_PACKAGES += mattermost-plugin-zoom-v1.5.0 PLUGIN_PACKAGES += focalboard-v0.15.0 +PLUGIN_PACKAGES += mattermost-plugin-apps-v1.0.1 # Prepares the enterprise build if exists. The IGNORE stuff is a hack to get the Makefile to execute the commands outside a target ifeq ($(BUILD_ENTERPRISE_READY),true) diff --git a/config/diff_test.go b/config/diff_test.go index 1b493908cc..6c05da327c 100644 --- a/config/diff_test.go +++ b/config/diff_test.go @@ -813,6 +813,9 @@ func TestDiff(t *testing.T) { "playbooks": { Enable: true, }, + "com.mattermost.apps": { + Enable: true, + }, }, }, }, @@ -845,6 +848,9 @@ func TestDiff(t *testing.T) { "playbooks": { Enable: true, }, + "com.mattermost.apps": { + Enable: true, + }, }, }, }, @@ -869,6 +875,9 @@ func TestDiff(t *testing.T) { "playbooks": { Enable: true, }, + "com.mattermost.apps": { + Enable: true, + }, }, }, }, diff --git a/model/config.go b/model/config.go index 63f7de130f..cd90888c7a 100644 --- a/model/config.go +++ b/model/config.go @@ -2752,6 +2752,11 @@ func (s *PluginSettings) SetDefaults(ls LogSettings) { s.PluginStates["focalboard"] = &PluginState{Enable: true} } + if s.PluginStates["com.mattermost.apps"] == nil { + // Enable the Apps plugin by default + s.PluginStates["com.mattermost.apps"] = &PluginState{Enable: true} + } + if s.EnableMarketplace == nil { s.EnableMarketplace = NewBool(PluginSettingsDefaultEnableMarketplace) } diff --git a/model/feature_flags.go b/model/feature_flags.go index faee6ea736..d50289f678 100644 --- a/model/feature_flags.go +++ b/model/feature_flags.go @@ -73,7 +73,7 @@ func (f *FeatureFlags) SetDefaults() { f.TestBoolFeature = false f.CollapsedThreads = true f.EnableRemoteClusterService = false - f.AppsEnabled = false + f.AppsEnabled = true f.AppBarEnabled = false f.PluginApps = "" f.PluginFocalboard = ""