Skip to content

Feat/whatsapp support#3

Merged
emanuilo merged 9 commits intomainfrom
feat/whatsapp-support
Apr 12, 2026
Merged

Feat/whatsapp support#3
emanuilo merged 9 commits intomainfrom
feat/whatsapp-support

Conversation

@emanuilo
Copy link
Copy Markdown
Owner

No description provided.

emanuilo and others added 9 commits April 6, 2026 21:43
Implement WhatsApp as a second messaging platform alongside Telegram.
Adds webhook-based message handling (text, image, voice), generalized
platform_images table for cross-platform image retrieval, setup wizard
and CLI command (`memclaw whatsapp`), and updated documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace Meta Cloud API (Business account + webhook) with neonize
(whatsmeow under the hood) so the bot links to the user's personal
WhatsApp via QR pairing — same simple UX as Telegram/Slack.

- WhatsAppBot in memclaw/bot/whatsapp_handlers.py: QR pairing, event
  handlers for text/image/audio, media download via download_any,
  replies via send_message/send_image
- memclaw whatsapp CLI runs the neonize client directly; session
  persists at ~/.memclaw/whatsapp/session.db
- Drop whatsapp_phone_number_id/access_token/verify_token from
  config + setup wizard
- Default policy: only self-notes (IsFromMe) are processed;
  WHATSAPP_ALLOWED_NUMBERS opens it up to other E.164 numbers
- pyproject: add neonize, drop unused starlette/uvicorn
- `memclaw bot` → `memclaw telegram` (clearer alongside `memclaw whatsapp`)
- Wizard only prompts for keys relevant to the invoking channel:
  `memclaw telegram` asks for core + Telegram keys; `memclaw whatsapp`
  asks for core keys only. `memclaw configure` still shows everything.
- Previously-saved keys are preserved when running a channel-scoped setup.
…save

The split between `image_save`, `telegram_image_save`, and
`whatsapp_image_save` was historical — each stored the same kind of
record keyed on a different opaque reference. Collapse into one tool:

    image_save(description, media_ref, caption?)

Platform tagging is now injected by the executor via MemclawAgent's
new `platform` kwarg. Handlers pass `platform="telegram"` /
`"whatsapp"`; the interactive CLI leaves it unset and records land
under `platform="local"`. Both handlers now include `media_ref=` in
the photo prompt (previously `file_id=` / `file_path=`).
@emanuilo emanuilo self-assigned this Apr 12, 2026
@emanuilo emanuilo merged commit 2ff9ba2 into main Apr 12, 2026
4 checks passed
@emanuilo emanuilo deleted the feat/whatsapp-support branch April 13, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant