kstmostofa/laravel-whatsapp
Dual-backend WhatsApp for Laravel: a pure-PHP Meta Cloud API client plus a whatsapp-web.js sidecar for personal-number access, unified under one WhatsApp:: facade, with a Livewire admin UI, Eloquent models, webhooks, and health checks.
Builds on v1.0.2. A resilience release for the web sidecar — both fixes are for WhatsApp Web minifying its own internals out from under whatsapp-web.js.
Messages no longer arrive with id: null (#6). Recent WhatsApp Web builds ship their ID classes minified, so a message key reaches the sidecar as { fromMe, remote, id, $1 } with no _serialized. The sidecar now rebuilds the canonical fromMe_remote_id[_participant] string from the key's own parts — chat, contact and participant IDs get the same treatment. PersistIncomingMessage also inserts rather than upserts when a message still has no ID, so those can't overwrite each other's row.
Loading chats no longer 500s with {"error": "r"} (#5). getChats() walks a large surface of minified internals and throws a one-letter error when WhatsApp moves them, taking /chats and /groups down with it. The sidecar now falls back to reading the in-page chat store itself, guarding every field access, so a chat it can't fully describe degrades to partial data instead of failing the request. Response shapes are unchanged.
npm test script for the sidecar — 17 tests covering the ID helpers and the chat-store fallback.{"error": "r"} symptom and the fallback log line.Upgrading is a composer update — no migrations, no config changes, no API changes.
Thanks to @alisaleem27 for reporting both issues with the detail that made them quick to pin down.
Full changelog: https://github.com/kstmostofa/laravel-whatsapp/compare/v1.0.2...v1.0.3
Builds on v1.0.1 (Windows support + configurable Chrome path).
session-* auth folders now reconnect automatically when the sidecar boots, so a restart / reboot no longer leaves sessions dormant until each is manually started. Opt out with WHATSAPP_WEB_AUTO_START_SESSIONS=false.Full changelog: https://github.com/kstmostofa/laravel-whatsapp/compare/v1.0.1...v1.0.2
which (a Unix-only command), so it always failed with "Node.js not found on PATH" even when Node was installed. Replaced with Symfony ExecutableFinder, and swapped rm -rf, $_SERVER['HOME'], nohup, and posix_kill for cross-platform equivalents (proc_open with a new console, taskkill/tasklist, USERPROFILE, and a pure-PHP recursive delete).whatsapp:sidecar:start no longer fails on Windows with "Failed to spawn sidecar process (no PID written)". The PID file is now seeded from proc_open's PID so the start poll succeeds while Node is still loading whatsapp-web.js.WHATSAPP_WEB_CHROME_PATH (falls back to PUPPETEER_EXECUTABLE_PATH) lets Puppeteer reuse a system Chrome/Chromium. This makes whatsapp:sidecar:install --skip-chromium actually usable — the escape hatch it already advertised was never wired through before.Full changelog: https://github.com/kstmostofa/laravel-whatsapp/compare/v1.0.0...v1.0.1
How can I help you explore Laravel packages today?