mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add ExperimentalTimezone flag (#8539)
This commit is contained in:
committed by
Harrison Healey
parent
d4c0494360
commit
eb48292a3a
@@ -92,6 +92,9 @@
|
||||
"ExperimentalTownSquareIsReadOnly": false,
|
||||
"ExperimentalPrimaryTeam": ""
|
||||
},
|
||||
"DisplaySettings": {
|
||||
"ExperimentalTimezone": false
|
||||
},
|
||||
"ClientRequirements": {
|
||||
"AndroidLatestVersion": "",
|
||||
"AndroidMinVersion": "",
|
||||
|
||||
@@ -1712,6 +1712,16 @@ func (s *MessageExportSettings) SetDefaults() {
|
||||
}
|
||||
}
|
||||
|
||||
type DisplaySettings struct {
|
||||
ExperimentalTimezone *bool
|
||||
}
|
||||
|
||||
func (s *DisplaySettings) SetDefaults() {
|
||||
if s.ExperimentalTimezone == nil {
|
||||
s.ExperimentalTimezone = NewBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
type TimezoneSettings struct {
|
||||
SupportedTimezonesPath *string
|
||||
}
|
||||
@@ -1755,6 +1765,7 @@ type Config struct {
|
||||
MessageExportSettings MessageExportSettings
|
||||
JobSettings JobSettings
|
||||
PluginSettings PluginSettings
|
||||
DisplaySettings DisplaySettings
|
||||
TimezoneSettings TimezoneSettings
|
||||
}
|
||||
|
||||
@@ -1826,6 +1837,7 @@ func (o *Config) SetDefaults() {
|
||||
o.WebrtcSettings.SetDefaults()
|
||||
o.MessageExportSettings.SetDefaults()
|
||||
o.TimezoneSettings.SetDefaults()
|
||||
o.DisplaySettings.SetDefaults()
|
||||
}
|
||||
|
||||
func (o *Config) IsValid() *AppError {
|
||||
|
||||
@@ -382,6 +382,7 @@ 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
|
||||
props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone)
|
||||
|
||||
props["SendEmailNotifications"] = strconv.FormatBool(c.EmailSettings.SendEmailNotifications)
|
||||
props["SendPushNotifications"] = strconv.FormatBool(*c.EmailSettings.SendPushNotifications)
|
||||
|
||||
Reference in New Issue
Block a user