summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorChris Duarte <csduarte@users.noreply.github.com>2018-07-23 08:18:24 -0700
committerHarrison Healey <harrisonmhealey@gmail.com>2018-07-23 11:18:24 -0400
commitda124f018dbb10a41f4d4b5ecb4818baf628e940 (patch)
tree89a582daa29f6b419a932e487cf97429b7403b01 /model/config.go
parente475cecf00880ef1ac691320164e37f6bbc8bddb (diff)
downloadchat-da124f018dbb10a41f4d4b5ecb4818baf628e940.tar.gz
chat-da124f018dbb10a41f4d4b5ecb4818baf628e940.tar.bz2
chat-da124f018dbb10a41f4d4b5ecb4818baf628e940.zip
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
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index f24abfe83..f36b321ec 100644
--- a/model/config.go
+++ b/model/config.go
@@ -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("")
}