From 8a97b7efa4b10c7a975d18d2beb8f17802ea5981 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 2 Jan 2025 16:50:23 +0100 Subject: [PATCH] notifications: send unacked ones first --- src/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notifications.js b/src/notifications.js index 6cc08d997..22044beab 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -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);