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
@@ -7466,7 +7466,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7474,7 +7474,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -7483,10 +7483,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
@@ -7635,7 +7635,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7643,7 +7643,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -7658,10 +7658,10 @@
|
|||||||
"x-role": "group_id"
|
"x-role": "group_id"
|
||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -7694,7 +7694,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7718,7 +7718,7 @@
|
|||||||
"x-role": "group_id"
|
"x-role": "group_id"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"auto_escape": {
|
"auto_escape": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@@ -7794,7 +7794,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7840,7 +7840,7 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message_type": {
|
"message_type": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -7998,7 +7998,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -8006,7 +8006,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -8020,10 +8020,10 @@
|
|||||||
"x-role": "user_id"
|
"x-role": "user_id"
|
||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -8055,7 +8055,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -8087,7 +8087,7 @@
|
|||||||
"x-role": "user_id"
|
"x-role": "user_id"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"group_id": {
|
"group_id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -10528,7 +10528,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10536,7 +10536,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10555,10 +10555,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"group_id": {
|
"group_id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -10581,7 +10581,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10589,7 +10589,7 @@
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10608,10 +10608,10 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"group_id": {
|
"group_id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
|||||||
@@ -7469,7 +7469,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7477,7 +7477,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -7486,10 +7486,10 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
@@ -7638,7 +7638,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7646,7 +7646,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -7661,10 +7661,10 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"x-role": "group_id"
|
"x-role": "group_id"
|
||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -7697,7 +7697,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7721,7 +7721,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"x-role": "group_id"
|
"x-role": "group_id"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"auto_escape": {
|
"auto_escape": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@@ -7797,7 +7797,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7843,7 +7843,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message_type": {
|
"message_type": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -8001,7 +8001,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -8009,7 +8009,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -8023,10 +8023,10 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"x-role": "user_id"
|
"x-role": "user_id"
|
||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -8058,7 +8058,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -8090,7 +8090,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"x-role": "user_id"
|
"x-role": "user_id"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"group_id": {
|
"group_id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -10531,7 +10531,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10539,7 +10539,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10558,10 +10558,10 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"group_id": {
|
"group_id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -10584,7 +10584,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10592,7 +10592,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "message",
|
"type": "message",
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -10611,10 +10611,10 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"messages": {
|
"messages": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"description": "OneBot message: string | segment[] | object"
|
"description": "OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly \"\" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation."
|
||||||
},
|
},
|
||||||
"group_id": {
|
"group_id": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
|||||||
@@ -323,7 +323,13 @@ export const f = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ok(raw);
|
return ok(raw);
|
||||||
}, { type: 'message', required: true, schema: { description: 'OneBot message: string | segment[] | object' } });
|
}, {
|
||||||
|
type: 'message',
|
||||||
|
required: true,
|
||||||
|
schema: {
|
||||||
|
description: 'OneBot message: string | segment[] | object. In segment arrays, text segments whose text field is exactly "" are compatibility placeholders and do not count as sendable segments; missing, null, and whitespace-only text remain subject to normal validation.',
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** Homogeneous array; `.nonEmpty()` rejects []. */
|
/** Homogeneous array; `.nonEmpty()` rejects []. */
|
||||||
array<E>(el: Field<E>): Field<E[]> & { nonEmpty(): Field<E[]> } {
|
array<E>(el: Field<E>): Field<E[]> & { nonEmpty(): Field<E[]> } {
|
||||||
|
|||||||
@@ -411,7 +411,10 @@ export async function parseMessage(message: JsonValue, autoEscape: boolean, opti
|
|||||||
// Some OneBot clients insert empty text between media as a separator.
|
// Some OneBot clients insert empty text between media as a separator.
|
||||||
// Only the exact empty string is a no-op; malformed and whitespace text
|
// Only the exact empty string is a no-op; malformed and whitespace text
|
||||||
// must still pass through strict element validation.
|
// 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);
|
const elem = await segmentToElement(seg.type, data, options);
|
||||||
if (elem) elements.push(elem);
|
if (elem) elements.push(elem);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user