diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-30 12:52:47 -0500 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-10-30 14:52:47 -0300 |
commit | 539f66313d4f23231aba73119dfc2e8340df1400 (patch) | |
tree | e73b02c03a4c98933820e3e19d1cf27237a72644 | |
parent | 443a880fbd4249d4782f39f2f96152a14147c08b (diff) | |
download | chat-539f66313d4f23231aba73119dfc2e8340df1400.tar.gz chat-539f66313d4f23231aba73119dfc2e8340df1400.tar.bz2 chat-539f66313d4f23231aba73119dfc2e8340df1400.zip |
Add autoclose dm config parameter (#7734)
* add autoclose dm config parameter
* update naming
-rw-r--r-- | model/config.go | 5 | ||||
-rw-r--r-- | utils/config.go | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 6cc7251b8..17b7e87e6 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 a26ce5728..2c3a9d291 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) |