ssb: Fix some SQL syntax for private messages. They need more work.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m16s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m16s
This commit is contained in:
parent
94d969fe46
commit
6c2fc1444d
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&Ph3a53rRidBNfYsfAtQKydoizUBCyh1Xl4I8XlzcQnk=.sha256"
|
"previous": "&m5ZrkzoyAjv7AY6AukzVoWIyUFUL97uuDDWCtxCloAU=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -147,12 +147,12 @@ class TfTabNewsFeedElement extends LitElement {
|
|||||||
result = await tfrpc.rpc.query(
|
result = await tfrpc.rpc.query(
|
||||||
`
|
`
|
||||||
SELECT TRUE AS is_primary, messages.rowid, messages.id, previous, author, sequence, timestamp, hash, json(content) AS content, signature
|
SELECT TRUE AS is_primary, messages.rowid, messages.id, previous, author, sequence, timestamp, hash, json(content) AS content, signature
|
||||||
FROM messages
|
FROM messages
|
||||||
JOIN json_each(?1) AS following ON messages.author = following.value
|
JOIN json_each(?1) AS following ON messages.author = following.value
|
||||||
WHERE
|
WHERE
|
||||||
(?2 IS NULL OR (messages.timestamp >= ?2) AND messages.timestamp < ?3 AND
|
(?2 IS NULL OR (messages.timestamp >= ?2)) AND messages.timestamp < ?3 AND
|
||||||
json(messages.content) LIKE '"%'
|
json(messages.content) LIKE '"%'
|
||||||
ORDER BY sequence DESC LIMIT 20
|
ORDER BY messages.sequence DESC LIMIT 20
|
||||||
`,
|
`,
|
||||||
[JSON.stringify(this.following), start_time, end_time]
|
[JSON.stringify(this.following), start_time, end_time]
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user