forked from cory/tildefriends
ssb: Populate reply information in posts.
This commit is contained in:
@ -205,6 +205,18 @@ class TfComposeElement extends LitElement {
|
||||
message.root = this.new_thread ? this.branch ?? this.root : this.root;
|
||||
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) {
|
||||
message.mentions = Object.values(draft.mentions);
|
||||
}
|
||||
|
Reference in New Issue
Block a user