Skip to content

v0.6.0 — Omnichannel (WhatsApp + Telegram + HTTP)

Latest

Choose a tag to compare

@eusougustavocesar eusougustavocesar released this 26 Apr 15:48
· 4 commits to main since this release

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,987654321

HTTP 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