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); });