Add autoclose dm config parameter (#7734)

* add autoclose dm config parameter

* update naming
This commit is contained in:
Chris
2017-10-30 12:52:47 -05:00
committed by enahum
parent 443a880fbd
commit 539f66313d
2 changed files with 6 additions and 0 deletions

View File

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

View File

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