From f6e7f7aca9da8d5d4ca6cd65b19daa01ebe4a43a Mon Sep 17 00:00:00 2001 From: gavrielc Date: Sun, 1 Feb 2026 21:49:39 +0200 Subject: [PATCH] Make main group respond to all messages without trigger prefix Other groups still require @Andy prefix to trigger the agent. Co-Authored-By: Claude Opus 4.5 --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b68f5fb..211d572 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,8 +63,10 @@ async function processMessage(msg: NewMessage): Promise { if (!group) return; const content = msg.content.trim(); + const isMainGroup = group.folder === MAIN_GROUP_FOLDER; - if (!TRIGGER_PATTERN.test(content)) return; + // Main group responds to all messages; other groups require trigger prefix + if (!isMainGroup && !TRIGGER_PATTERN.test(content)) return; // Get all messages since last agent interaction so the session has full context const sinceTimestamp = lastAgentTimestamp[msg.chat_jid] || '';