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
This commit is contained in:
Cory McWilliams 2023-11-13 17:32:15 +00:00
parent d467c4dd8a
commit 305f5232e7
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "📝",
"previous": "&G+R9QBUONLBiFGEecnE0w/qJPLOlj3WqtVUVemBdpbo=.sha256"
"previous": "&HpEPHrCdoej769DCZmJYH0ma9OfzdhPKMTEmvcNz8Wg=.sha256"
}

View File

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