Some UI tweaks and some sqlite performance things.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3755 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-01-13 00:16:27 +00:00
parent 35b7eb511a
commit 7ba1e6980f
6 changed files with 8 additions and 5 deletions

View File

@@ -237,9 +237,9 @@ async function getRelatedPostIds(db, message, ids, limit) {
" rowid <= ? AND "+
" author IN (" + ids_batch.map(x => '?').join(", ") + ") AND "+
" json_extract(content, '$.type') = 'post' AND "+
" json_extract(content, '$.root') = ? "+
" (id = ? OR json_extract(content, '$.root') = ?) "+
"ORDER BY timestamp DESC LIMIT ?",
[].concat([message.timestamp, row_id_max], ids_batch, [id, limit]),
[].concat([message.timestamp, row_id_max], ids_batch, [message.id, id, limit]),
function(row) {
if (row.id) {
recent.push({id: row.id, timestamp: row.timestamp});