diff --git a/app/diagnostics.go b/app/diagnostics.go index 1c0fab7ac3..35e27c558b 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 6288a748c4..9d9e438adb 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 27fdb90ce6..64bfc06ce1 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 a4b4754490..dff4efd6ee 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)