MM-30048 added thread related socket messages (#16234)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Eli Yukelzon
2020-11-20 11:00:52 +02:00
коммит произвёл GitHub
родитель 7b515d27f2
Коммит cf4df5fcd2
11 изменённых файлов: 190 добавлений и 26 удалений

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

@@ -1976,7 +1976,7 @@ func (s *SqlPostStore) updateThreadsFromPosts(transaction *gorp.Transaction, pos
if thread, found := threadByRoot[rootId]; !found {
// calculate participants
var participants model.StringArray
if _, err := transaction.Select(&participants, "SELECT DISTINCT UserId FROM Posts WHERE RootId=:RootId", map[string]interface{}{"RootId": rootId}); err != nil {
if _, err := transaction.Select(&participants, "SELECT DISTINCT UserId FROM Posts WHERE RootId=:RootId OR Id=:RootId", map[string]interface{}{"RootId": rootId}); err != nil {
return err
}
// calculate reply count