fix(onebot): restore cached reply previews (#458)
Restore readable quote previews for cached messages while preserving reply targets and message content. Refs #458
This commit is contained in:
1 parent
1ef9a2c330
commit
7a07119ee9
6 files changed
+108
No files matched your search
@@ -150,6 +150,10 @@ function makeReplyElem(element: MessageElement): ProtoElem {
|
||||
srcMsg.time = element.replyTime;
|
||||
}
|
||||
|
||||
const previews = (element.replyElements ?? []).filter(e => e.type === 'text' && e.text);
|
||||
if (previews.length) {
|
||||
srcMsg.elemsRaw = previews.map(e => protobuf_encode<Elem>({ text: { str: e.text! } }));
|
||||
}
|
||||
return { srcMsg };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user