Merge pull request #12 from gavrielc/claude/fix-agent-failure-timestamp-yiOZt

Fix: only update lastAgentTimestamp on agent success
This commit is contained in:
gavrielc
2026-02-01 20:40:15 +02:00
committed by GitHub

View File

@@ -86,9 +86,8 @@ async function processMessage(msg: NewMessage): Promise<void> {
const response = await runAgent(group, prompt, msg.chat_jid); const response = await runAgent(group, prompt, msg.chat_jid);
await setTyping(msg.chat_jid, false); await setTyping(msg.chat_jid, false);
lastAgentTimestamp[msg.chat_jid] = msg.timestamp;
if (response) { if (response) {
lastAgentTimestamp[msg.chat_jid] = msg.timestamp;
await sendMessage(msg.chat_jid, `${ASSISTANT_NAME}: ${response}`); await sendMessage(msg.chat_jid, `${ASSISTANT_NAME}: ${response}`);
} }
} }