fix(onebot): trace empty text placeholder normalization

Document the compatibility rule in action metadata and regenerate the MCP catalog.
This commit is contained in:
DrSmoothl committed 2026-07-23 12:14:01 +08:00
1 parent a7b9ba14fb
commit edd2ac278a
4 files changed
+63 -54

No files matched your search

+4 -1
View File
@@ -411,7 +411,10 @@ export async function parseMessage(message: JsonValue, autoEscape: boolean, opti
// Some OneBot clients insert empty text between media as a separator.
// Only the exact empty string is a no-op; malformed and whitespace text
// must still pass through strict element validation.
if (seg.type.trim().toLowerCase() === 'text' && data.text === '') continue;
if (seg.type.trim().toLowerCase() === 'text' && data.text === '') {
log.debug('ignored explicit empty text placeholder in message segment array');
continue;
}
const elem = await segmentToElement(seg.type, data, options);
if (elem) elements.push(elem);
}