What's new
Omnichannel support
reverb is now channel-agnostic. A single ContextFactory pattern wires all channels to the same handlers — no channel-specific code in business logic.
WhatsApp — unchanged behavior, refactored internals.
Telegram — new native adapter via grammy long-polling. No server exposed.
TELEGRAM_ENABLED=true
TELEGRAM_TOKEN=your-bot-token
TELEGRAM_ALLOWED_IDS=123456789,987654321HTTP chat — new POST /api/chat endpoint. Synchronous: sends a message, gets all replies back in one response.
curl http://localhost:3737/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "what files are in /tmp?"}'
# → { "ok": true, "replies": ["Here are the files..."] }ContextFactory
Each channel adapter injects only what it knows (reply, downloadMedia, sendPresence). Handlers call ctx.reply() and never touch Baileys, grammy, or HTTP primitives.
This makes it trivial to add future channels (Slack, Discord, SMS) by implementing a ~50-line adapter.
Stats
- 212 tests passing (9 suites)
- Build: clean TypeScript
- Dependencies added:
grammy