From 305f5232e7c54df29be353e10f058492358a28a6 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 13 Nov 2023 17:32:15 +0000 Subject: [PATCH] Add a missing order by to fix missing wiki changes. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4630 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- apps/wiki.json | 2 +- apps/wiki/app.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/wiki.json b/apps/wiki.json index c72ae28d..62aea7cc 100644 --- a/apps/wiki.json +++ b/apps/wiki.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "📝", - "previous": "&G+R9QBUONLBiFGEecnE0w/qJPLOlj3WqtVUVemBdpbo=.sha256" + "previous": "&HpEPHrCdoej769DCZmJYH0ma9OfzdhPKMTEmvcNz8Wg=.sha256" } \ No newline at end of file diff --git a/apps/wiki/app.js b/apps/wiki/app.js index 42c4239f..1fe93f2f 100644 --- a/apps/wiki/app.js +++ b/apps/wiki/app.js @@ -136,6 +136,7 @@ tfrpc.register(async function collection(ids, kind, parent, max_rowid, data, inc data = data ?? {}; let rowid = 0; let first = true; + print('CHECKING', kind, ids); await ssb.sqlAsync('SELECT MAX(rowid) AS rowid FROM messages', [], function(row) { rowid = row.rowid; }); @@ -161,6 +162,7 @@ tfrpc.register(async function collection(ids, kind, parent, max_rowid, data, inc ((json_extract(messages.content, '$.type') = ?4 AND (?5 IS NULL OR json_extract(messages.content, '$.parent') = ?5)) OR (?6 AND content LIKE '"%')) + ORDER BY timestamp `, [JSON.stringify(ids), max_rowid ?? -1, rowid, kind, parent, include_private ? true : false], function(row) { rows.push(row); });