ssb: Populate reply information in posts.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m33s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 21m33s
This commit is contained in:
parent
500f172561
commit
58e9646fa6
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&rhBtzGjBcBKINc5qlyopW95SMiPPEP/0GQRDjH6Hsz0=.sha256"
|
"previous": "&QuEaXfdWGAl42dkJBoHocZbtKRT3zT25BNgCo88CSfE=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -205,6 +205,18 @@ class TfComposeElement extends LitElement {
|
|||||||
message.root = this.new_thread ? this.branch ?? this.root : this.root;
|
message.root = this.new_thread ? this.branch ?? this.root : this.root;
|
||||||
message.branch = this.branch;
|
message.branch = this.branch;
|
||||||
}
|
}
|
||||||
|
let reply = Object.fromEntries((await tfrpc.rpc.query(
|
||||||
|
`
|
||||||
|
SELECT messages.id, messages.author FROM messages
|
||||||
|
JOIN json_each(?) AS refs ON messages.id = refs.value
|
||||||
|
`,
|
||||||
|
[JSON.stringify([this.root, this.branch])])).map(row => [
|
||||||
|
row.id,
|
||||||
|
row.author,
|
||||||
|
]));
|
||||||
|
if (Object.keys(reply).length) {
|
||||||
|
message.reply = reply;
|
||||||
|
}
|
||||||
if (Object.values(draft.mentions || {}).length) {
|
if (Object.values(draft.mentions || {}).length) {
|
||||||
message.mentions = Object.values(draft.mentions);
|
message.mentions = Object.values(draft.mentions);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user