diff options
author | Jesús Espino <jespinog@gmail.com> | 2017-09-20 17:38:27 +0200 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-09-20 11:38:27 -0400 |
commit | 62e5e2fda8d70d7f0b2cd3f47360a06134db58f0 (patch) | |
tree | aa26e4783c0fa232e625ad0da35ee76c448f086f | |
parent | 3a80225d617fa273d92613756aca8889e1466eb1 (diff) | |
download | chat-62e5e2fda8d70d7f0b2cd3f47360a06134db58f0.tar.gz chat-62e5e2fda8d70d7f0b2cd3f47360a06134db58f0.tar.bz2 chat-62e5e2fda8d70d7f0b2cd3f47360a06134db58f0.zip |
PLT-7508: Add settings to disable wide mention confirmation (#7416)
-rw-r--r-- | app/diagnostics.go | 1 | ||||
-rw-r--r-- | config/default.json | 1 | ||||
-rw-r--r-- | model/config.go | 6 | ||||
-rw-r--r-- | utils/config.go | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/app/diagnostics.go b/app/diagnostics.go index 1c0fab7ac..35e27c558 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -236,6 +236,7 @@ func trackConfig() { "enable_custom_brand": *utils.Cfg.TeamSettings.EnableCustomBrand, "restrict_direct_message": *utils.Cfg.TeamSettings.RestrictDirectMessage, "max_notifications_per_channel": *utils.Cfg.TeamSettings.MaxNotificationsPerChannel, + "enable_confirm_notifications_to_channel": *utils.Cfg.TeamSettings.EnableConfirmNotificationsToChannel, "max_users_per_team": *utils.Cfg.TeamSettings.MaxUsersPerTeam, "max_channels_per_team": *utils.Cfg.TeamSettings.MaxChannelsPerTeam, "teammate_name_display": *utils.Cfg.TeamSettings.TeammateNameDisplay, diff --git a/config/default.json b/config/default.json index 6288a748c..9d9e438ad 100644 --- a/config/default.json +++ b/config/default.json @@ -75,6 +75,7 @@ "UserStatusAwayTimeout": 300, "MaxChannelsPerTeam": 2000, "MaxNotificationsPerChannel": 1000, + "EnableConfirmNotificationsToChannel": true, "TeammateNameDisplay": "username", "ExperimentalTownSquareIsReadOnly": false }, diff --git a/model/config.go b/model/config.go index 27fdb90ce..64bfc06ce 100644 --- a/model/config.go +++ b/model/config.go @@ -368,6 +368,7 @@ type TeamSettings struct { UserStatusAwayTimeout *int64 MaxChannelsPerTeam *int64 MaxNotificationsPerChannel *int64 + EnableConfirmNotificationsToChannel *bool TeammateNameDisplay *string ExperimentalTownSquareIsReadOnly *bool } @@ -855,6 +856,11 @@ func (o *Config) SetDefaults() { *o.TeamSettings.MaxNotificationsPerChannel = 1000 } + if o.TeamSettings.EnableConfirmNotificationsToChannel == nil { + o.TeamSettings.EnableConfirmNotificationsToChannel = new(bool) + *o.TeamSettings.EnableConfirmNotificationsToChannel = true + } + if o.TeamSettings.ExperimentalTownSquareIsReadOnly == nil { o.TeamSettings.ExperimentalTownSquareIsReadOnly = new(bool) *o.TeamSettings.ExperimentalTownSquareIsReadOnly = false diff --git a/utils/config.go b/utils/config.go index a4b475449..dff4efd6e 100644 --- a/utils/config.go +++ b/utils/config.go @@ -509,6 +509,7 @@ func getClientConfig(c *model.Config) map[string]string { props["EnableWebrtc"] = strconv.FormatBool(*c.WebrtcSettings.Enable) props["MaxNotificationsPerChannel"] = strconv.FormatInt(*c.TeamSettings.MaxNotificationsPerChannel, 10) + props["EnableConfirmNotificationsToChannel"] = strconv.FormatBool(*c.TeamSettings.EnableConfirmNotificationsToChannel) props["TimeBetweenUserTypingUpdatesMilliseconds"] = strconv.FormatInt(*c.ServiceSettings.TimeBetweenUserTypingUpdatesMilliseconds, 10) props["EnableUserTypingMessages"] = strconv.FormatBool(*c.ServiceSettings.EnableUserTypingMessages) props["EnableChannelViewedMessages"] = strconv.FormatBool(*c.ServiceSettings.EnableChannelViewedMessages) |