ssb: Recover some of the load time lost in filtering out subscribed channels.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 33m20s

This commit is contained in:
2025-10-06 12:45:40 -04:00
parent 00fb6c9839
commit 6fad20ffa3
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&t1siEPL4Q0S9k11mGhYOdMwQyLPYARhL+0hsvbDAFgs=.sha256"
"previous": "&byK/qn2Q4IfVc7gE2ExwX6oyj6O1iXhQCAlR1ftYjtQ=.sha256"
}

View File

@@ -263,7 +263,7 @@ class TfTabNewsFeedElement extends LitElement {
WHERE messages.timestamp < ?3 AND (?2 IS NULL OR messages.timestamp >= ?2) AND
messages.content ->> 'type' != 'vote' AND channels.value IS NULL)
SELECT * FROM news
WHERE NOT EXISTS (SELECT * FROM messages_refs JOIN json_each(?5) AS channels ON messages_refs.message = news.id AND messages_refs.ref = '#' || channels.value)
WHERE NOT EXISTS (SELECT * FROM messages_refs JOIN json_each(?5) AS channels ON messages_refs.message = news.id AND messages_refs.ref = '#' || channels.value WHERE messages_refs.ref LIKE '#%')
ORDER BY timestamp DESC LIMIT ?4
`,
[