From 1869cab358cb8cdfe4e01666e4e1425bfbff033a Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Wed, 4 Feb 2026 16:00:30 -0500 Subject: [PATCH] fix(10-07): add timestamp to logs refresh to prevent message not modified error - Format Inline Logs Result now adds timestamp to message - Shows 'Updated: HH:MM:SS' at bottom of logs display - Ensures Telegram API always accepts refresh (content always different) --- n8n-workflow.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/n8n-workflow.json b/n8n-workflow.json index 52a3d8a..87e21da 100644 --- a/n8n-workflow.json +++ b/n8n-workflow.json @@ -4836,7 +4836,7 @@ }, { "parameters": { - "jsCode": "// Format logs result for inline keyboard display\nconst result = $json;\nconst data = $('Prepare Inline Logs Input').item.json;\n\n// Get container state (need to fetch from Docker)\n// For now, build basic keyboard\nconst containerName = result.containerName;\n\n// Build inline keyboard\nconst keyboard = [\n [\n { text: '\ud83d\udd04 Refresh Logs', callback_data: `action:logs:${containerName}` },\n { text: '\u2b06\ufe0f Update', callback_data: `action:update:${containerName}` }\n ],\n [\n { text: '\u25c0\ufe0f Back to List', callback_data: 'list:0' }\n ]\n];\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n text: result.message,\n reply_markup: { inline_keyboard: keyboard }\n }\n};" + "jsCode": "// Format logs result for inline keyboard display\nconst result = $json;\nconst data = $('Prepare Inline Logs Input').item.json;\n\nconst containerName = result.containerName;\n\n// Add timestamp to prevent 'message not modified' error on refresh\nconst timestamp = new Date().toLocaleTimeString('en-US', {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false\n});\n\n// Build inline keyboard\nconst keyboard = [\n [\n { text: '\ud83d\udd04 Refresh Logs', callback_data: `action:logs:${containerName}` },\n { text: '\u2b06\ufe0f Update', callback_data: `action:update:${containerName}` }\n ],\n [\n { text: '\u25c0\ufe0f Back to List', callback_data: 'list:0' }\n ]\n];\n\n// Append timestamp to message\nconst messageWithTimestamp = result.message + `\\n\\nUpdated: ${timestamp}`;\n\nreturn {\n json: {\n chatId: data.chatId,\n messageId: data.messageId,\n text: messageWithTimestamp,\n reply_markup: { inline_keyboard: keyboard }\n }\n};" }, "id": "b1800598-1ff6-4da3-8506-4e4e8127f902", "name": "Format Inline Logs Result",