[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 удалений

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

@@ -890,7 +890,7 @@ func (s *SqlThreadStore) GetPosts(threadId string, since int64) ([]*model.Post,
From("Posts").
Where(sq.Eq{"RootId": threadId}).
Where(sq.Eq{"DeleteAt": 0}).
Where(sq.GtOrEq{"UpdateAt": since}).ToSql()
Where(sq.GtOrEq{"CreateAt": since}).ToSql()
if err != nil {
return nil, errors.Wrap(err, "failed to build query to fetch thread posts")
}