MM-19574 Don't return metadata for deleted posts (#12878)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
23aa193f28
Коммит
1234e68575
@@ -87,6 +87,11 @@ func (a *App) PreparePostForClient(originalPost *model.Post, isNewPost bool, isE
|
||||
|
||||
post.Metadata = &model.PostMetadata{}
|
||||
|
||||
if post.DeleteAt > 0 {
|
||||
// Don't fill out metadata for deleted posts
|
||||
return post
|
||||
}
|
||||
|
||||
// Emojis and reaction counts
|
||||
if emojis, reactions, err := a.getEmojisAndReactionsForPost(post); err != nil {
|
||||
mlog.Warn("Failed to get emojis and reactions for a post", mlog.String("post_id", post.Id), mlog.Err(err))
|
||||
|
||||
Ссылка в новой задаче
Block a user