MM-19574 Don't return metadata for deleted posts (#12878)

Этот коммит содержится в:
Harrison Healey
2019-10-23 14:31:22 -04:00
коммит произвёл GitHub
родитель 23aa193f28
Коммит 1234e68575
2 изменённых файлов: 35 добавлений и 0 удалений

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

@@ -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))