[MM-41993]: fixed counting thread mentions in unread root post (#19874)

* removed appending the root post to the posts list

also changed `UpdateAt` to `CreateAt` in thread_store.go in accordance with kyriakos

* fixed failing test after latest change

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Michel Engelen
2022-04-11 18:43:14 +02:00
коммит произвёл GitHub
родитель 7f0d1cf0dd
Коммит ca8aea9a06
3 изменённых файлов: 9 добавлений и 5 удалений

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

@@ -1502,7 +1502,6 @@ func (a *App) countThreadMentions(user *model.User, post *model.Post, teamID str
if nErr != nil {
return 0, model.NewAppError("countMentionsFromPost", "app.channel.count_posts_since.app_error", nil, nErr.Error(), http.StatusInternalServerError)
}
posts = append(posts, post)
for _, p := range posts {
if p.CreateAt >= timestamp {