From 1cde88f1479558fbd26dc46e002c7cde43befdb4 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Tue, 17 Mar 2020 12:01:59 -0400 Subject: [PATCH] Setting to enable new experimental channel sidebar (#14036) * Merge upstream * [MM-20881] Server changes for new experimental channel sidebar setting (#13434) * Remove report.xml Co-authored-by: Jason Deland Co-authored-by: Devin Binnie Co-authored-by: Harrison Healey Co-authored-by: mattermod --- app/diagnostics.go | 1 + config/client.go | 1 + model/config.go | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/app/diagnostics.go b/app/diagnostics.go index 39140e3994..dceb613270 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -312,6 +312,7 @@ func (a *App) trackConfig() { "experimental_strict_csrf_enforcement": *cfg.ServiceSettings.ExperimentalStrictCSRFEnforcement, "enable_email_invitations": *cfg.ServiceSettings.EnableEmailInvitations, "experimental_channel_organization": *cfg.ServiceSettings.ExperimentalChannelOrganization, + "experimental_channel_sidebar_organization": *cfg.ServiceSettings.ExperimentalChannelSidebarOrganization, "disable_bots_when_owner_is_deactivated": *cfg.ServiceSettings.DisableBotsWhenOwnerIsDeactivated, "enable_bot_account_creation": *cfg.ServiceSettings.EnableBotAccountCreation, "enable_svgs": *cfg.ServiceSettings.EnableSVGs, diff --git a/config/client.go b/config/client.go index 1b93f31c51..261b5abeef 100644 --- a/config/client.go +++ b/config/client.go @@ -57,6 +57,7 @@ func GenerateClientConfig(c *model.Config, diagnosticID string, license *model.L props["ExperimentalChannelOrganization"] = strconv.FormatBool(false) } + props["ExperimentalChannelSidebarOrganization"] = *c.ServiceSettings.ExperimentalChannelSidebarOrganization props["ExperimentalEnableAutomaticReplies"] = strconv.FormatBool(*c.TeamSettings.ExperimentalEnableAutomaticReplies) props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone) diff --git a/model/config.go b/model/config.go index ed319e2a9a..07951dd5d6 100644 --- a/model/config.go +++ b/model/config.go @@ -314,6 +314,7 @@ type ServiceSettings struct { ExperimentalEnableDefaultChannelLeaveJoinMessages *bool ExperimentalGroupUnreadChannels *string ExperimentalChannelOrganization *bool + ExperimentalChannelSidebarOrganization *string DEPRECATED_DO_NOT_USE_ImageProxyType *string `json:"ImageProxyType" mapstructure:"ImageProxyType"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_ImageProxyURL *string `json:"ImageProxyURL" mapstructure:"ImageProxyURL"` // This field is deprecated and must not be used. DEPRECATED_DO_NOT_USE_ImageProxyOptions *string `json:"ImageProxyOptions" mapstructure:"ImageProxyOptions"` // This field is deprecated and must not be used. @@ -655,6 +656,10 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) { s.ExperimentalChannelOrganization = NewBool(experimentalUnreadEnabled) } + if s.ExperimentalChannelSidebarOrganization == nil { + s.ExperimentalChannelSidebarOrganization = NewString("disabled") + } + if s.DEPRECATED_DO_NOT_USE_ImageProxyType == nil { s.DEPRECATED_DO_NOT_USE_ImageProxyType = NewString("") }