[MM-48010] Fetch Threads since parameter should return threads with new replies. (#22228)

* Fix

* Test fix and condition is GtOrEq
Этот коммит содержится в:
Anurag Shivarathri
2023-02-03 19:50:10 +05:30
коммит произвёл GitHub
родитель 56424a7601
Коммит 6a93d46556
2 изменённых файлов: 40 добавлений и 1 удалений

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

@@ -314,7 +314,11 @@ func (s *SqlThreadStore) GetThreadsForUser(userId, teamId string, opts model.Get
}
if opts.Since > 0 {
query = query.Where(sq.GtOrEq{"ThreadMemberships.LastUpdated": opts.Since})
query = query.
Where(sq.Or{
sq.GtOrEq{"ThreadMemberships.LastUpdated": opts.Since},
sq.GtOrEq{"Threads.LastReplyAt": opts.Since},
})
}
if opts.Unread {