mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add ExperimentalSidebarPreference in the config (#9013)
* Add ExperimentalSidebarPreference in the config * Override Sidebar preference based on GroupUnread settings * Rename to ExperimentalChannelOrganization * Add Sidebar config in diagnostics * Fix diagnostics for experimental_channel_organization
This commit is contained in:
committed by
Harrison Healey
parent
e475cecf00
commit
da124f018d
@@ -252,6 +252,7 @@ func (a *App) trackConfig() {
|
||||
"experimental_enable_hardened_mode": *cfg.ServiceSettings.ExperimentalEnableHardenedMode,
|
||||
"experimental_limit_client_config": *cfg.ServiceSettings.ExperimentalLimitClientConfig,
|
||||
"enable_email_invitations": *cfg.ServiceSettings.EnableEmailInvitations,
|
||||
"experimental_channel_organization": *cfg.ServiceSettings.ExperimentalChannelOrganization,
|
||||
})
|
||||
|
||||
a.SendDiagnostic(TRACK_CONFIG_TEAM, map[string]interface{}{
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
"EnableTutorial": true,
|
||||
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
|
||||
"ExperimentalGroupUnreadChannels": "disabled",
|
||||
"ExperimentalChannelOrganization": false,
|
||||
"ImageProxyType": "",
|
||||
"ImageProxyOptions": "",
|
||||
"ImageProxyURL": "",
|
||||
|
||||
@@ -233,6 +233,7 @@ type ServiceSettings struct {
|
||||
EnableTutorial *bool
|
||||
ExperimentalEnableDefaultChannelLeaveJoinMessages *bool
|
||||
ExperimentalGroupUnreadChannels *string
|
||||
ExperimentalChannelOrganization *bool
|
||||
ImageProxyType *string
|
||||
ImageProxyURL *string
|
||||
ImageProxyOptions *string
|
||||
@@ -478,6 +479,11 @@ func (s *ServiceSettings) SetDefaults() {
|
||||
s.ExperimentalGroupUnreadChannels = NewString(GROUP_UNREAD_CHANNELS_DEFAULT_ON)
|
||||
}
|
||||
|
||||
if s.ExperimentalChannelOrganization == nil {
|
||||
experimentalUnreadEnabled := *s.ExperimentalGroupUnreadChannels != GROUP_UNREAD_CHANNELS_DISABLED
|
||||
s.ExperimentalChannelOrganization = NewBool(experimentalUnreadEnabled)
|
||||
}
|
||||
|
||||
if s.ImageProxyType == nil {
|
||||
s.ImageProxyType = NewString("")
|
||||
}
|
||||
|
||||
@@ -533,6 +533,13 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
|
||||
props["EnableTutorial"] = strconv.FormatBool(*c.ServiceSettings.EnableTutorial)
|
||||
props["ExperimentalEnableDefaultChannelLeaveJoinMessages"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages)
|
||||
props["ExperimentalGroupUnreadChannels"] = *c.ServiceSettings.ExperimentalGroupUnreadChannels
|
||||
|
||||
if *c.ServiceSettings.ExperimentalChannelOrganization || *c.ServiceSettings.ExperimentalGroupUnreadChannels != model.GROUP_UNREAD_CHANNELS_DISABLED {
|
||||
props["ExperimentalChannelOrganization"] = strconv.FormatBool(true)
|
||||
} else {
|
||||
props["ExperimentalChannelOrganization"] = strconv.FormatBool(false)
|
||||
}
|
||||
|
||||
props["ExperimentalEnableAutomaticReplies"] = strconv.FormatBool(*c.TeamSettings.ExperimentalEnableAutomaticReplies)
|
||||
props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user