fix(onebot): trace empty text placeholder normalization
Document the compatibility rule in action metadata and regenerate the MCP catalog.
This commit is contained in:
4 files changed
+63
-54
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user