Revert "[MM-37013] Async job to fix CRT channel unreads (#18340)" (#19319)

This reverts commit 0da249c651.
Этот коммит содержится в:
Ashish Bhate
2022-01-12 18:51:47 +05:30
коммит произвёл GitHub
родитель d0724d8b00
Коммит a55bd001b4
21 изменённых файлов: 0 добавлений и 622 удалений

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

@@ -2734,23 +2734,3 @@ func (s *SqlPostStore) updateThreadsFromPosts(transaction *sqlxTxWrapper, posts
}
return nil
}
// GetUniquePostTypesSince returns the unique post types in a channel after the given timestamp
func (s *SqlPostStore) GetUniquePostTypesSince(channelId string, timestamp int64) ([]string, error) {
query, args, err := s.getQueryBuilder().
Select("DISTINCT Type").
From("Posts").
Where(sq.And{
sq.Eq{"ChannelId": channelId},
sq.GtOrEq{"CreateAt": timestamp},
sq.Eq{"DeleteAt": 0},
}).ToSql()
if err != nil {
return nil, err
}
types := []string{}
if err := s.GetReplicaX().Select(&types, query, args...); err != nil {
return nil, err
}
return types, nil
}