summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2018-01-23 17:59:41 -0300
committerGitHub <noreply@github.com>2018-01-23 17:59:41 -0300
commitf2415b98f652bc695d3825e54ac832ee468c0a63 (patch)
treec82f7b7dee16c6ccb69646aaf8a18a65fd4477ac
parent195ad5620402f1a3239e75ef140e64c3731abf29 (diff)
downloadchat-f2415b98f652bc695d3825e54ac832ee468c0a63.tar.gz
chat-f2415b98f652bc695d3825e54ac832ee468c0a63.tar.bz2
chat-f2415b98f652bc695d3825e54ac832ee468c0a63.zip
[ICU-621] Add ExperimentalGroupUnreadChannels setting (#8127)
* Add ExperimentalGroupUnreadChannels setting * track ExperimentalGroupUnreadChannels in diagnostics
-rw-r--r--app/diagnostics.go1
-rw-r--r--config/default.json1
-rw-r--r--model/config.go5
-rw-r--r--utils/config.go1
4 files changed, 8 insertions, 0 deletions
diff --git a/app/diagnostics.go b/app/diagnostics.go
index 135875de6..46473dc7a 100644
--- a/app/diagnostics.go
+++ b/app/diagnostics.go
@@ -240,6 +240,7 @@ func (a *App) trackConfig() {
"enable_preview_features": *cfg.ServiceSettings.EnablePreviewFeatures,
"enable_tutorial": *cfg.ServiceSettings.EnableTutorial,
"experimental_enable_default_channel_leave_join_messages": *cfg.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages,
+ "experimental_group_unread_channels": *cfg.ServiceSettings.ExperimentalGroupUnreadChannels,
})
a.SendDiagnostic(TRACK_CONFIG_TEAM, map[string]interface{}{
diff --git a/config/default.json b/config/default.json
index 6474043cb..4bcccdf19 100644
--- a/config/default.json
+++ b/config/default.json
@@ -57,6 +57,7 @@
"CloseUnusedDirectMessages": false,
"EnableTutorial": true,
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
+ "ExperimentalGroupUnreadChannels": false,
"ImageProxyType": "",
"ImageProxyURL": ""
},
diff --git a/model/config.go b/model/config.go
index 6e3e8859e..60a6d1983 100644
--- a/model/config.go
+++ b/model/config.go
@@ -214,6 +214,7 @@ type ServiceSettings struct {
EnablePreviewFeatures *bool
EnableTutorial *bool
ExperimentalEnableDefaultChannelLeaveJoinMessages *bool
+ ExperimentalGroupUnreadChannels *bool
ImageProxyType *string
ImageProxyURL *string
ImageProxyOptions *string
@@ -422,6 +423,10 @@ func (s *ServiceSettings) SetDefaults() {
s.ExperimentalEnableDefaultChannelLeaveJoinMessages = NewBool(true)
}
+ if s.ExperimentalGroupUnreadChannels == nil {
+ s.ExperimentalGroupUnreadChannels = NewBool(false)
+ }
+
if s.ImageProxyType == nil {
s.ImageProxyType = NewString("")
}
diff --git a/utils/config.go b/utils/config.go
index bcc2054b3..b93d673a3 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -397,6 +397,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string) map[string]strin
props["EnablePreviewFeatures"] = strconv.FormatBool(*c.ServiceSettings.EnablePreviewFeatures)
props["EnableTutorial"] = strconv.FormatBool(*c.ServiceSettings.EnableTutorial)
props["ExperimentalEnableDefaultChannelLeaveJoinMessages"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages)
+ props["ExperimentalGroupUnreadChannels"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalGroupUnreadChannels)
props["SendEmailNotifications"] = strconv.FormatBool(c.EmailSettings.SendEmailNotifications)
props["SendPushNotifications"] = strconv.FormatBool(*c.EmailSettings.SendPushNotifications)