Fix EnablChannelViewedMessages typo (#6822)

* Update config.json

* Update config.go

* Update config.go

* Update channel.go

* Update post.go

* Update diagnostics.go

* Update config.go
Этот коммит содержится в:
Jason Blais
2017-07-03 09:01:14 -04:00
коммит произвёл Joram Wilander
родитель a6e9a7a38f
Коммит ac2c91c507
6 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@@ -1091,7 +1091,7 @@ func UpdateChannelLastViewedAt(channelIds []string, userId string) *model.AppErr
return result.Err return result.Err
} }
if *utils.Cfg.ServiceSettings.EnablChannelViewedMessages { if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages {
for _, channelId := range channelIds { for _, channelId := range channelIds {
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", userId, nil) message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", userId, nil)
message.Add("channel_id", channelId) message.Add("channel_id", channelId)
@@ -1158,7 +1158,7 @@ func ViewChannel(view *model.ChannelView, userId string, clearPushNotifications
return result.Err return result.Err
} }
if *utils.Cfg.ServiceSettings.EnablChannelViewedMessages { if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages {
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", userId, nil) message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", userId, nil)
message.Add("channel_id", view.ChannelId) message.Add("channel_id", view.ChannelId)
go Publish(message) go Publish(message)

Просмотреть файл

@@ -189,7 +189,7 @@ func trackConfig() {
"allow_edit_post": *utils.Cfg.ServiceSettings.AllowEditPost, "allow_edit_post": *utils.Cfg.ServiceSettings.AllowEditPost,
"post_edit_time_limit": *utils.Cfg.ServiceSettings.PostEditTimeLimit, "post_edit_time_limit": *utils.Cfg.ServiceSettings.PostEditTimeLimit,
"enable_user_typing_messages": *utils.Cfg.ServiceSettings.EnableUserTypingMessages, "enable_user_typing_messages": *utils.Cfg.ServiceSettings.EnableUserTypingMessages,
"enable_channel_viewed_messages": *utils.Cfg.ServiceSettings.EnablChannelViewedMessages, "enable_channel_viewed_messages": *utils.Cfg.ServiceSettings.EnableChannelViewedMessages,
"time_between_user_typing_updates_milliseconds": *utils.Cfg.ServiceSettings.TimeBetweenUserTypingUpdatesMilliseconds, "time_between_user_typing_updates_milliseconds": *utils.Cfg.ServiceSettings.TimeBetweenUserTypingUpdatesMilliseconds,
"cluster_log_timeout_milliseconds": *utils.Cfg.ServiceSettings.ClusterLogTimeoutMilliseconds, "cluster_log_timeout_milliseconds": *utils.Cfg.ServiceSettings.ClusterLogTimeoutMilliseconds,
"enable_post_search": *utils.Cfg.ServiceSettings.EnablePostSearch, "enable_post_search": *utils.Cfg.ServiceSettings.EnablePostSearch,

Просмотреть файл

@@ -49,7 +49,7 @@ func CreatePostAsUser(post *model.Post) (*model.Post, *model.AppError) {
l4g.Error(utils.T("api.post.create_post.last_viewed.error"), post.ChannelId, post.UserId, result.Err) l4g.Error(utils.T("api.post.create_post.last_viewed.error"), post.ChannelId, post.UserId, result.Err)
} }
if *utils.Cfg.ServiceSettings.EnablChannelViewedMessages { if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages {
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", post.UserId, nil) message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", post.UserId, nil)
message.Add("channel_id", post.ChannelId) message.Add("channel_id", post.ChannelId)
go Publish(message) go Publish(message)

Просмотреть файл

@@ -45,7 +45,7 @@
"EnablePostSearch": true, "EnablePostSearch": true,
"EnableUserTypingMessages": true, "EnableUserTypingMessages": true,
"EnableUserStatuses": true, "EnableUserStatuses": true,
"EnablChannelViewedMessages": true, "EnableChannelViewedMessages": true,
"ClusterLogTimeoutMilliseconds": 2000 "ClusterLogTimeoutMilliseconds": 2000
}, },
"ElasticSearchSettings": { "ElasticSearchSettings": {
@@ -287,4 +287,4 @@
"DataRetentionSettings": { "DataRetentionSettings": {
"Enable": false "Enable": false
} }
} }

Просмотреть файл

@@ -165,7 +165,7 @@ type ServiceSettings struct {
TimeBetweenUserTypingUpdatesMilliseconds *int64 TimeBetweenUserTypingUpdatesMilliseconds *int64
EnablePostSearch *bool EnablePostSearch *bool
EnableUserTypingMessages *bool EnableUserTypingMessages *bool
EnablChannelViewedMessages *bool EnableChannelViewedMessages *bool
EnableUserStatuses *bool EnableUserStatuses *bool
ClusterLogTimeoutMilliseconds *int ClusterLogTimeoutMilliseconds *int
} }
@@ -1314,9 +1314,9 @@ func (o *Config) SetDefaults() {
*o.ServiceSettings.EnableUserTypingMessages = true *o.ServiceSettings.EnableUserTypingMessages = true
} }
if o.ServiceSettings.EnablChannelViewedMessages == nil { if o.ServiceSettings.EnableChannelViewedMessages == nil {
o.ServiceSettings.EnablChannelViewedMessages = new(bool) o.ServiceSettings.EnableChannelViewedMessages = new(bool)
*o.ServiceSettings.EnablChannelViewedMessages = true *o.ServiceSettings.EnableChannelViewedMessages = true
} }
if o.ServiceSettings.EnableUserStatuses == nil { if o.ServiceSettings.EnableUserStatuses == nil {

Просмотреть файл

@@ -474,7 +474,7 @@ func getClientConfig(c *model.Config) map[string]string {
props["MaxNotificationsPerChannel"] = strconv.FormatInt(*c.TeamSettings.MaxNotificationsPerChannel, 10) props["MaxNotificationsPerChannel"] = strconv.FormatInt(*c.TeamSettings.MaxNotificationsPerChannel, 10)
props["TimeBetweenUserTypingUpdatesMilliseconds"] = strconv.FormatInt(*c.ServiceSettings.TimeBetweenUserTypingUpdatesMilliseconds, 10) props["TimeBetweenUserTypingUpdatesMilliseconds"] = strconv.FormatInt(*c.ServiceSettings.TimeBetweenUserTypingUpdatesMilliseconds, 10)
props["EnableUserTypingMessages"] = strconv.FormatBool(*c.ServiceSettings.EnableUserTypingMessages) props["EnableUserTypingMessages"] = strconv.FormatBool(*c.ServiceSettings.EnableUserTypingMessages)
props["EnablChannelViewedMessages"] = strconv.FormatBool(*c.ServiceSettings.EnablChannelViewedMessages) props["EnableChannelViewedMessages"] = strconv.FormatBool(*c.ServiceSettings.EnableChannelViewedMessages)
props["DiagnosticId"] = CfgDiagnosticId props["DiagnosticId"] = CfgDiagnosticId
props["DiagnosticsEnabled"] = strconv.FormatBool(*c.LogSettings.EnableDiagnostics) props["DiagnosticsEnabled"] = strconv.FormatBool(*c.LogSettings.EnableDiagnostics)