From 5b2bafd7bb0c7ef35401aa18f4f696fec181a088 Mon Sep 17 00:00:00 2001 From: glifocat Date: Sun, 8 Mar 2026 18:58:48 +0100 Subject: [PATCH] fix(whatsapp): use sender's JID for DM-with-bot registration, skip trigger (#751) Two bugs in the DM with dedicated bot number setup: 1. The skill asked for the bot's own phone number to use as the JID. But from the bot's perspective, incoming DMs appear with the SENDER's JID (the user's personal number), not the bot's own number. The registration must use the user's personal number as the JID. 2. DM with bot (1:1 conversation) should use --no-trigger-required, same as self-chat. A trigger prefix is unnecessary in a private DM. Co-authored-by: Claude Sonnet 4.6 --- .claude/skills/add-whatsapp/SKILL.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.claude/skills/add-whatsapp/SKILL.md b/.claude/skills/add-whatsapp/SKILL.md index 660123a..023e748 100644 --- a/.claude/skills/add-whatsapp/SKILL.md +++ b/.claude/skills/add-whatsapp/SKILL.md @@ -201,7 +201,11 @@ AskUserQuestion: Where do you want to chat with the assistant? node -e "const c=JSON.parse(require('fs').readFileSync('store/auth/creds.json','utf-8'));console.log(c.me?.id?.split(':')[0]+'@s.whatsapp.net')" ``` -**DM with bot:** Ask for the bot's phone number. JID = `NUMBER@s.whatsapp.net` +**DM with bot:** The JID is the **user's** phone number — the number they will message *from* (not the bot's own number). Ask: + +AskUserQuestion: What is your personal phone number? (The number you'll use to message the bot — include country code without +, e.g. 1234567890) + +JID = `@s.whatsapp.net` **Group (solo, existing):** Run group sync and list available groups: @@ -223,7 +227,7 @@ npx tsx setup/index.ts --step register \ --channel whatsapp \ --assistant-name "" \ --is-main \ - --no-trigger-required # Only for main/self-chat + --no-trigger-required # For self-chat and DM with bot (1:1 conversations don't need a trigger prefix) ``` For additional groups (trigger-required):