diff --git a/model/config.go b/model/config.go index 6cc7251b83..17b7e87e64 100644 --- a/model/config.go +++ b/model/config.go @@ -204,6 +204,7 @@ type ServiceSettings struct { EnableChannelViewedMessages *bool EnableUserStatuses *bool ClusterLogTimeoutMilliseconds *int + CloseUnusedDirectMessages *bool } type ClusterSettings struct { @@ -1376,6 +1377,10 @@ func (o *Config) SetDefaults() { o.ServiceSettings.ClusterLogTimeoutMilliseconds = NewInt(2000) } + if o.ServiceSettings.CloseUnusedDirectMessages == nil { + o.ServiceSettings.CloseUnusedDirectMessages = NewBool(false) + } + if o.ElasticsearchSettings.ConnectionUrl == nil { o.ElasticsearchSettings.ConnectionUrl = NewString(ELASTICSEARCH_SETTINGS_DEFAULT_CONNECTION_URL) } diff --git a/utils/config.go b/utils/config.go index a26ce5728e..2c3a9d291c 100644 --- a/utils/config.go +++ b/utils/config.go @@ -458,6 +458,7 @@ func getClientConfig(c *model.Config) map[string]string { props["RestrictPostDelete"] = *c.ServiceSettings.RestrictPostDelete props["AllowEditPost"] = *c.ServiceSettings.AllowEditPost props["PostEditTimeLimit"] = fmt.Sprintf("%v", *c.ServiceSettings.PostEditTimeLimit) + props["CloseUnusedDirectMessages"] = strconv.FormatBool(*c.ServiceSettings.CloseUnusedDirectMessages) props["SendEmailNotifications"] = strconv.FormatBool(c.EmailSettings.SendEmailNotifications) props["SendPushNotifications"] = strconv.FormatBool(*c.EmailSettings.SendPushNotifications)