PLT-6610 sending websocket event for last channel viewed (#6787)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
bf81fea9f8
Коммит
eb7561e05b
@@ -48,6 +48,12 @@ func CreatePostAsUser(post *model.Post) (*model.Post, *model.AppError) {
|
||||
if result := <-Srv.Store.Channel().UpdateLastViewedAt([]string{post.ChannelId}, post.UserId); result.Err != nil {
|
||||
l4g.Error(utils.T("api.post.create_post.last_viewed.error"), post.ChannelId, post.UserId, result.Err)
|
||||
}
|
||||
|
||||
if *utils.Cfg.ServiceSettings.EnablChannelViewedMessages {
|
||||
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", post.UserId, nil)
|
||||
message.Add("channel_id", post.ChannelId)
|
||||
go Publish(message)
|
||||
}
|
||||
}
|
||||
|
||||
return rp, nil
|
||||
|
||||
Ссылка в новой задаче
Block a user