fix(onebot): keep ambiguous quote previews unresolved

Avoid selecting a text message when another cached message could share its truncated or media preview. Extend the quote-context regression checks.

Fixes #502
This commit is contained in:
DrSmoothl committed 2026-10-04 13:04:28 +08:00
1 parent b9bdcec5f1
commit b69108e1cc
3 files changed
+44 -8

No files matched your search

@@ -530,7 +530,8 @@ describe('convertEvent — message elements', () => {
it('reply: self-sent private targets use the outgoing lookup namespace', async () => {
const calls: unknown[][] = [];
const seg = await segment(
{ type: 'reply', replySeq: 5, replySenderUin: SELF_ID, replyTime: 1234 },
{ type: 'reply', replySeq: 5, replySenderUin: SELF_ID, replyTime: 1234,
replyElements: [{ type: 'text', text: 'quoted text' }] },
{
messageIdResolver: (...args) => {
calls.push(args);
@@ -546,6 +547,7 @@ describe('convertEvent — message elements', () => {
5,
PRIVATE_SENT_MESSAGE_EVENT,
1234,
[{ type: 'text', text: 'quoted text' }],
]);
});