[ICU-621] Add ExperimentalGroupUnreadChannels setting (#8127)

* Add ExperimentalGroupUnreadChannels setting

* track ExperimentalGroupUnreadChannels in diagnostics
Этот коммит содержится в:
enahum
2018-01-23 17:59:41 -03:00
коммит произвёл GitHub
родитель 195ad56204
Коммит f2415b98f6
4 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@@ -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{}{

Просмотреть файл

@@ -57,6 +57,7 @@
"CloseUnusedDirectMessages": false,
"EnableTutorial": true,
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
"ExperimentalGroupUnreadChannels": false,
"ImageProxyType": "",
"ImageProxyURL": ""
},

Просмотреть файл

@@ -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("")
}

Просмотреть файл

@@ -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)