fix(10.1-06): fix action type passthrough and text status routing

- Prepare Text Action Input now reads action (stop/start/restart) from
  Parse Action Command instead of matching sub-workflow's actionType field
- Added "Has Status Message ID" If node to route status_direct results:
  messageId > 0 → Edit Container List (callback), messageId == 0 →
  Send Container Submenu Direct (text command)
- Pre-existing bug: text "status <name>" routed to editMessageText with
  messageId 0, causing Telegram API error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-02-08 08:55:47 -05:00
parent 596b0e5dab
commit 138728a7b1
+52 -2
View File
@@ -3229,7 +3229,7 @@
}, },
{ {
"parameters": { "parameters": {
"jsCode": "// Prepare input for container actions sub-workflow\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\nconst actionType = data.actionType || 'restart';\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: actionType,\n chatId: chatId,\n messageId: 0, // Text mode doesn't have a message to edit\n responseMode: 'text'\n }\n};" "jsCode": "// Prepare input for container actions sub-workflow\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\n// Get the actual requested action (stop/start/restart) from Parse Action Command\nconst actionType = $('Parse Action Command').item.json.action || 'restart';\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: actionType,\n chatId: chatId,\n messageId: 0, // Text mode doesn't have a message to edit\n responseMode: 'text'\n }\n};"
}, },
"id": "code-prepare-text-action-rr53pd94", "id": "code-prepare-text-action-rr53pd94",
"name": "Prepare Text Action Input", "name": "Prepare Text Action Input",
@@ -4732,6 +4732,38 @@
2000, 2000,
-300 -300
] ]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "has-message-id",
"leftValue": "={{ $json.messageId }}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "gt"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "if-has-status-message-id",
"name": "Has Status Message ID",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
1890,
1000
]
} }
], ],
"connections": { "connections": {
@@ -6165,7 +6197,7 @@
], ],
[ [
{ {
"node": "Edit Container List", "node": "Has Status Message ID",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
@@ -6541,6 +6573,24 @@
} }
] ]
] ]
},
"Has Status Message ID": {
"main": [
[
{
"node": "Edit Container List",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Container Submenu Direct",
"type": "main",
"index": 0
}
]
]
} }
}, },
"pinData": {}, "pinData": {},