v0.2.8
The engine-pluggability release: the whatsapp-web.js delivery-ack, message-type, and JID specifics are
now decoupled behind the neutral engine interface (a different engine, e.g. Baileys, can map its own at
the adapter boundary). Plus dashboard message templates, best-effort @lid → phone resolution, and a
Docker fix for sessions stuck at "authenticating".
⚠️ Breaking for webhook consumers: themessage.received/message.senttypefield is now a
neutral enum — incomingchat→text,ptt→voice,vcard/multi_vcard→contact. Update
any consumer that matched the raw whatsapp-web.js tokens. See Changed below.
Added
- Message templates (dashboard). Manage reusable message templates from a new dashboard page
(create/edit/delete,{{variable}}placeholders), backed by the existingsessions/:id/templates
API, with full i18n across all locales. Thanks @Leslie-23 (#266). - Resolve a
@lidprivacy id to a phone number (#263), engine-neutral via a new
IWhatsAppEngine.resolveContactPhone. On-demand endpointGET /sessions/:id/contacts/:contactId/phone
→{ contactId, phone }(MSISDN digits, ornullwhen the engine can't map it — best-effort, since
@lidexists to hide numbers). Optional inline resolution: setRESOLVE_LID_TO_PHONE=trueto attach
a best-effortsenderPhoneto themessage.receivedwebhook + websocket payload for@lidsenders
(off by default; per-sender lookups are cached). A non-whatsapp-web.js engine implements its own mapping.
Changed
- Message delivery status is now engine-agnostic (engine-pluggability decoupling, #265). The raw whatsapp-web.js
ack integer no longer leaks past the engine adapter — a neutralDeliveryStatus
(pending/sent/delivered/read/failed) flows through the interface, services, webhooks, websocket, and
dashboard, so a non-whatsapp-web.js engine (e.g. Baileys) can map its own delivery codes at the adapter boundary.- The
message.ack/message.failedwebhooks now include a neutralstatusfield. The legacyackinteger
is kept (deprecated) for backward compatibility — new consumers should readstatus. - Dashboard chat delivery ticks now update live over the websocket (the ack push was previously never emitted).
- Minor deprecated-surface deltas: the legacy webhook
ackreports3(not4) for a "played" voice/video receipt,
and a play-after-read no longer emits a secondmessage.ack(both map tostatus: 'read').
- The
- Message
typeis now an engine-neutral enum (engine-pluggability decoupling, #265). Raw whatsapp-web.js
message-type tokens no longer leak past the engine adapter — incoming live/history messages, persisted rows, and the
message.received/message.sentwebhooks now use a neutralMessageType
(text/image/video/audio/voice/document/sticker/location/contact/revoked/unknown), consistent with
outgoing sends. A non-whatsapp-web.js engine maps its own tokens at the adapter boundary.- Webhook contract change (both
message.receivedandmessage.sent): incomingtypewas previously raw — e.g.
chat→text,ptt→voice,vcard→contact. New consumers should expect the neutral enum. - An idempotent startup backfill rewrites existing
messages.typerows to the neutral vocabulary (runs in every DB
mode, including the zero-config SQLite default where data migrations don't), so historical chats render correctly
and message-type stats don't split the same kind across old/new tokens. - Fixes a latent dashboard bug where incoming text (
chat) was mis-styled as media and shown as[chat]in reply previews.
- Webhook contract change (both
- JID construction moved into the engine (engine-pluggability decoupling, #265). The check-number endpoint
(GET /sessions/:id/contacts/check/:number) now returns the engine's canonical chat id via a new
IWhatsAppEngine.getNumberId(number)instead of the controller hand-building a…@c.usJID. As a result the
returnedwhatsappIdis the engine-resolved id and may be normalized — it can differ from the submitted number's
…@c.usform (e.g. a@lididentifier) rather than echoing the input. And status/story
broadcasts are flagged with a neutralisStatusBroadcaston the message payload, so engine-neutral code no longer
matches the engine-specificstatus@broadcastpseudo-JID. A non-whatsapp-web.js engine supplies its own JID scheme.
Fixed
- The
WWEBJS_WEB_VERSION(andWWEBJS_WEB_VERSION_REMOTE_PATH) workaround for sessions stuck at
"authenticating" (#251) is now actually passed through by the Docker Compose files. Theenvironment:
blocks enumerate vars explicitly with noenv_file, so settingWWEBJS_WEB_VERSIONin.envpreviously
never reached the container — making the documented fix a no-op for Compose users. Added the passthrough
(empty default = auto-select, no behavior change when unset) todocker-compose.ymland
docker-compose.dev.yml. (#273) - Refined the Italian (
it) dashboard translations. Thanks @albanobattistella (#272).