diff options
author | Chris Duarte <csduarte@users.noreply.github.com> | 2018-03-29 07:04:17 -0700 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2018-03-29 10:04:17 -0400 |
commit | eb48292a3a69ac5ffac91cdb0c5e5349ae8f85eb (patch) | |
tree | 239cc93989cb6840db5c531ab1d21721810d73e2 | |
parent | d4c04943604b69a0dc6bbc94172968ad234ef077 (diff) | |
download | chat-eb48292a3a69ac5ffac91cdb0c5e5349ae8f85eb.tar.gz chat-eb48292a3a69ac5ffac91cdb0c5e5349ae8f85eb.tar.bz2 chat-eb48292a3a69ac5ffac91cdb0c5e5349ae8f85eb.zip |
Add ExperimentalTimezone flag (#8539)
-rw-r--r-- | config/default.json | 3 | ||||
-rw-r--r-- | model/config.go | 12 | ||||
-rw-r--r-- | utils/config.go | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/config/default.json b/config/default.json index ed0af5cc6..56783753b 100644 --- a/config/default.json +++ b/config/default.json @@ -92,6 +92,9 @@ "ExperimentalTownSquareIsReadOnly": false, "ExperimentalPrimaryTeam": "" }, + "DisplaySettings": { + "ExperimentalTimezone": false + }, "ClientRequirements": { "AndroidLatestVersion": "", "AndroidMinVersion": "", diff --git a/model/config.go b/model/config.go index f1017d15a..17a0aafbf 100644 --- a/model/config.go +++ b/model/config.go @@ -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 { diff --git a/utils/config.go b/utils/config.go index 35a21dea4..13295b362 100644 --- a/utils/config.go +++ b/utils/config.go @@ -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) |