ssb: Load more context for mentions.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m39s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m39s
This commit is contained in:
parent
d51b3da1b4
commit
003951fdf7
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&HKGkFsEAu//dKIiim7TsQ6qkx6TRKtvWG/Dj0A3RMIM=.sha256"
|
"previous": "&PP5y+K7wgLxdkeeb4iqyK1Fb+vwS9LjLJDt2FPrVlpo=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -51,15 +51,21 @@ class TfTabNewsFeedElement extends LitElement {
|
|||||||
if (this.hash == '#@') {
|
if (this.hash == '#@') {
|
||||||
result = await tfrpc.rpc.query(
|
result = await tfrpc.rpc.query(
|
||||||
`
|
`
|
||||||
|
WITH mentions AS (SELECT messages.rowid, messages.id, messages.previous, messages.author, messages.sequence, messages.timestamp, messages.hash, json(messages.content) AS content, messages.signature
|
||||||
|
FROM messages_fts(?1)
|
||||||
|
JOIN messages ON messages.rowid = messages_fts.rowid
|
||||||
|
JOIN json_each(?2) AS following ON messages.author = following.value
|
||||||
|
WHERE
|
||||||
|
messages.author != ?1 AND
|
||||||
|
messages.timestamp >= ?3 AND
|
||||||
|
messages.timestamp < ?4
|
||||||
|
ORDER BY timestamp DESC limit 20)
|
||||||
SELECT messages.rowid, messages.id, messages.previous, messages.author, messages.sequence, messages.timestamp, messages.hash, json(messages.content) AS content, messages.signature
|
SELECT messages.rowid, messages.id, messages.previous, messages.author, messages.sequence, messages.timestamp, messages.hash, json(messages.content) AS content, messages.signature
|
||||||
FROM messages_fts(?1)
|
FROM mentions
|
||||||
JOIN messages ON messages.rowid = messages_fts.rowid
|
JOIN messages_refs ON mentions.id = messages_refs.ref
|
||||||
JOIN json_each(?2) AS following ON messages.author = following.value
|
JOIN messages ON messages_refs.message = messages.id
|
||||||
WHERE
|
UNION
|
||||||
messages.author != ?1 AND
|
SELECT * FROM mentions
|
||||||
messages.timestamp >= ?3 AND
|
|
||||||
messages.timestamp < ?4
|
|
||||||
ORDER BY timestamp DESC limit 20
|
|
||||||
`,
|
`,
|
||||||
[
|
[
|
||||||
'"' + this.whoami.replace('"', '""') + '"',
|
'"' + this.whoami.replace('"', '""') + '"',
|
||||||
|
Loading…
Reference in New Issue
Block a user