Merge pull request #32212 from nextcloud/bugfix/noid/make-the-order-of-reactions-reliable

Make the order of reactions reliable
pull/32218/head
Joas Schilling 2022-04-28 19:37:58 +07:00 committed by GitHub
commit 42b98d01bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

@ -1269,6 +1269,7 @@ class Manager implements ICommentsManager {
->where($totalQuery->expr()->eq('r.parent_id', $qb->createNamedParameter($parentId)))
->groupBy('r.reaction')
->orderBy('total', 'DESC')
->addOrderBy('r.reaction', 'ASC')
->setMaxResults(20);
$jsonQuery = $this->dbConn->getQueryBuilder();