forked from cory/tildefriends
ssb: An experiment in including hashtag mentions in channel content. Also sort the channel list like I thought I already did.
This commit is contained in:
parent
10b15896b3
commit
8a27c45ab1
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🐌",
|
||||
"previous": "&CYrIO97YKzR9kzp6sfWVx0g+xah9iuF8BlOg9EDMgMk=.sha256"
|
||||
"previous": "&+H2UcjXWpt50AtiIz8Uac38RJgLshQ0lAAH8Gb5/DNs=.sha256"
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class TfElement extends LitElement {
|
||||
delete channel_map[row.channel];
|
||||
}
|
||||
}
|
||||
this.channels = Object.keys(channel_map);
|
||||
this.channels = Object.keys(channel_map).sort();
|
||||
}
|
||||
|
||||
set_hash(hash) {
|
||||
|
@ -97,6 +97,15 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
JOIN messages_refs ON news.id = messages_refs.message
|
||||
JOIN messages ON messages_refs.ref = messages.id
|
||||
UNION
|
||||
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(?5)
|
||||
JOIN messages ON messages.rowid = messages_fts.rowid
|
||||
JOIN json_each(?1) AS following ON messages.author = following.value
|
||||
JOIN json_tree(messages.content, '$.mentions') AS mention ON mention.value = '#' || ?4
|
||||
WHERE
|
||||
messages.timestamp > ?2 AND
|
||||
messages.timestamp < ?3
|
||||
UNION
|
||||
SELECT news.* FROM news
|
||||
`,
|
||||
[
|
||||
@ -104,6 +113,7 @@ class TfTabNewsFeedElement extends LitElement {
|
||||
start_time,
|
||||
end_time,
|
||||
this.hash.substring(2),
|
||||
'"#' + this.hash.substring(2).replace('"', '""') + '"',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user