ssb: Move mentions into the channels sidebar.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
This commit is contained in:
@ -36,11 +36,30 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
}
|
||||
|
||||
channel() {
|
||||
return this.hash.startsWith('##') ? this.hash.substring(2) : '';
|
||||
return this.hash.startsWith('##') ? this.hash.substring(2) : this.hash.substring(1);
|
||||
}
|
||||
|
||||
async fetch_messages(start_time, end_time) {
|
||||
if (this.hash.startsWith('#@')) {
|
||||
if (this.hash == '#@') {
|
||||
let r = await tfrpc.rpc.query(
|
||||
`
|
||||
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
|
||||
`, [
|
||||
'"' + this.whoami.replace('"', '""') + '"',
|
||||
JSON.stringify(this.following),
|
||||
start_time,
|
||||
end_time,
|
||||
]);
|
||||
return r;
|
||||
} else if (this.hash.startsWith('#@')) {
|
||||
let r = await tfrpc.rpc.query(
|
||||
`
|
||||
WITH mine AS (SELECT rowid, id, previous, author, sequence, timestamp, hash, json(content) AS content, signature
|
||||
@ -177,7 +196,6 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
}
|
||||
|
||||
async decrypt(messages) {
|
||||
console.log('decrypt');
|
||||
let result = [];
|
||||
for (let message of messages) {
|
||||
let content;
|
||||
|
Reference in New Issue
Block a user