MM-32027 - Marking a thread as unread not possible or marks all threads as unread. (#16757)

* mark thread as read query fix

* test fix

* lint
Этот коммит содержится в:
Eli Yukelzon
2021-01-24 11:37:09 +02:00
коммит произвёл GitHub
родитель 28c3809036
Коммит c2316c15f3
2 изменённых файлов: 23 добавлений и 44 удалений

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

@@ -310,7 +310,8 @@ func (s *SqlThreadStore) MarkAllAsRead(userId, teamId string) error {
func (s *SqlThreadStore) MarkAsRead(userId, threadId string, timestamp int64) error {
query, args, _ := s.getQueryBuilder().
Update("ThreadMemberships").
Where(sq.Eq{"UserId": userId}, sq.Eq{"PostId": threadId}).
Where(sq.Eq{"UserId": userId}).
Where(sq.Eq{"PostId": threadId}).
Set("LastViewed", timestamp).
ToSql()
if _, err := s.GetMaster().Exec(query, args...); err != nil {