MM-11434 Performance improvements for post metadata (#9849)
* Remove unused error return value from PreparePostForClient * Remove unused error return value from PreparePostListForClient * MM-11434 Parallelize PreparePostListForClient * MM-11434 Skip looking reactions and files on post whenever possible * Add note about the use of deprecated fields
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7aef759fd8
Коммит
23c8950312
@@ -6,7 +6,6 @@ package app
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
@@ -112,13 +111,10 @@ func (a *App) sendReactionEvent(event string, reaction *model.Reaction, post *mo
|
||||
message.Add("reaction", reaction.ToJson())
|
||||
a.Publish(message)
|
||||
|
||||
clientPost, err := a.PreparePostForClient(post)
|
||||
if err != nil {
|
||||
mlog.Error("Failed to prepare new post for client after reaction", mlog.Any("err", err))
|
||||
}
|
||||
post.HasReactions = hasReactions
|
||||
post.UpdateAt = model.GetMillis()
|
||||
|
||||
clientPost.HasReactions = hasReactions
|
||||
clientPost.UpdateAt = model.GetMillis()
|
||||
clientPost := a.PreparePostForClient(post)
|
||||
|
||||
umessage := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_POST_EDITED, "", post.ChannelId, "", nil)
|
||||
umessage.Add("post", clientPost.ToJson())
|
||||
|
||||
Ссылка в новой задаче
Block a user