This reverts commit 971af6935c.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e24f22745e
Коммит
c91ab6267a
@@ -149,7 +149,7 @@ func (s *SqlThreadStore) GetThreadsForUser(userId, teamId string, opts model.Get
|
|||||||
if !opts.Deleted {
|
if !opts.Deleted {
|
||||||
fetchConditions = sq.And{
|
fetchConditions = sq.And{
|
||||||
fetchConditions,
|
fetchConditions,
|
||||||
sq.Eq{"Posts.DeleteAt": 0},
|
sq.Eq{"COALESCE(Posts.DeleteAt, 0)": 0},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,9 +169,9 @@ func (s *SqlThreadStore) GetThreadsForUser(userId, teamId string, opts model.Get
|
|||||||
go func() {
|
go func() {
|
||||||
repliesQuery, repliesQueryArgs, _ := s.getQueryBuilder().
|
repliesQuery, repliesQueryArgs, _ := s.getQueryBuilder().
|
||||||
Select("COUNT(DISTINCT(Posts.RootId))").
|
Select("COUNT(DISTINCT(Posts.RootId))").
|
||||||
From("Posts, ThreadMemberships, Channels").
|
From("Posts").
|
||||||
Where("Posts.RootId = ThreadMemberships.PostId").
|
LeftJoin("ThreadMemberships ON Posts.RootId = ThreadMemberships.PostId").
|
||||||
Where("Posts.ChannelId = Channels.Id").
|
LeftJoin("Channels ON Posts.ChannelId = Channels.Id").
|
||||||
Where(fetchConditions).
|
Where(fetchConditions).
|
||||||
Where("Posts.CreateAt > ThreadMemberships.LastViewed").ToSql()
|
Where("Posts.CreateAt > ThreadMemberships.LastViewed").ToSql()
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user