Make the order of reactions reliable

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-04-28 16:13:41 +02:00 committed by backportbot-nextcloud[bot]
parent 04055e79c0
commit b806e1f009

View file

@ -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();