mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add autoclose dm config parameter (#7734)
* add autoclose dm config parameter * update naming
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user