notifications: send unacked ones first

This commit is contained in:
Girish Ramakrishnan
2025-01-02 16:50:23 +01:00
parent 1e2ca7b835
commit 8a97b7efa4

View File

@@ -129,7 +129,7 @@ async function list(filters, page, perPage) {
let query = `SELECT ${NOTIFICATION_FIELDS} FROM notifications`;
if (where.length) query += ' WHERE ' + where.join(' AND ');
query += ' ORDER BY creationTime DESC LIMIT ?,?';
query += ' ORDER BY acknowledged ASC, creationTime DESC LIMIT ?,?';
args.push((page-1)*perPage);
args.push(perPage);