forked from cory/tildefriends
ssb: Use the cache of private messages we built for the unread notification to actually show private messages. Still needs some work, but it's something.
This commit is contained in:
@ -17,6 +17,7 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
loading: {type: Number},
|
||||
time_range: {type: Array},
|
||||
time_loading: {type: Array},
|
||||
private_messages: {type: Array},
|
||||
};
|
||||
}
|
||||
|
||||
@ -148,13 +149,13 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
`
|
||||
SELECT TRUE AS is_primary, messages.rowid, messages.id, previous, author, sequence, timestamp, hash, json(content) AS content, signature
|
||||
FROM messages
|
||||
JOIN json_each(?1) AS following ON messages.author = following.value
|
||||
JOIN json_each(?1) AS private_messages ON messages.id = private_messages.value
|
||||
WHERE
|
||||
(?2 IS NULL OR (messages.timestamp >= ?2)) AND messages.timestamp < ?3 AND
|
||||
json(messages.content) LIKE '"%'
|
||||
ORDER BY messages.sequence DESC LIMIT 20
|
||||
`,
|
||||
[JSON.stringify(this.following), start_time, end_time]
|
||||
[JSON.stringify(this.private_messages), start_time, end_time]
|
||||
);
|
||||
result = (await this.decrypt(result)).filter((x) => x.decrypted);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user