Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(29): correct the claims the source contradicts

Yudhi Armyndharis5a058334a084
diff --git a/docs/29-engine-capability-matrix.md b/docs/29-engine-capability-matrix.md
index 15ca18c2c..a05b768ee 100644
--- a/docs/29-engine-capability-matrix.md
+++ b/docs/29-engine-capability-matrix.md
@@ -20,7 +20,8 @@ Statuses used in the tables:
operation. Not fixable without raw-proto/fork work or an event-cache hack.
- **OpenWA REST** column — what a caller of the REST API gets: **✅** on any engine session,
**⚠️ `<engine>` only** when the answer depends on the session's engine (the other engine
- answers HTTP 501), **❌ 501** on both engines.
+ answers HTTP 501), **❌ 501** on both engines, and **⚙️ internal** for a method the REST surface
+ never exposes because the gateway calls it itself (`probeLiveness`).
Two complementary views:
@@ -44,7 +45,7 @@ flowchart LR
subgraph OpenWA["OpenWA"]
API["REST API controllers"] --> SVC["Modules / services"]
SVC --> IF["IWhatsAppEngine - 112 methods"]
- IF --> WA["WwebjsAdapter"]
+ IF --> WA["WhatsAppWebJsAdapter"]
IF --> BA["BaileysAdapter"]
SVC --> STORE["OpenWA-side stores"]
end
@@ -66,7 +67,7 @@ Key adapter facts:
never a stub returning `null`/`[]` that a caller reads as an answer. `engine-parity.spec.ts`
enforces the biconditional in both directions: a cell is `not-available` if and only if the
adapter method throws, so a row cannot quietly stop throwing.
-- **The two adapters are structured differently.** `WwebjsAdapter` methods are thin forwarders to
+- **The two adapters are structured differently.** `WhatsAppWebJsAdapter` methods are thin forwarders to
delegate modules (`wwebjs-catalog.ts`, `wwebjs-groups.ts`, …), so their throws live in the
delegates. `BaileysAdapter` throws inline via `this.unsupported(...)`. The drift gate below
covers both shapes: besides the `Class.prototype.method.toString()` throw-scan it derives a
@@ -118,7 +119,7 @@ wrong interface method. Those three remain reader-verified.
## 29.3 Install-time patches OpenWA applies to the libraries
-OpenWA ships five exact, self-disabling source transforms over the installed engines. Each runs at
+OpenWA ships seven exact, self-disabling source transforms over the installed engines. Each runs at
`npm install` (`scripts/postinstall.js`, `--best-effort`) and again in the Docker production stage
(**without** best-effort — dependency drift fails the image build). "Self-disabling" means the
patcher no-ops once the fix is present upstream, and an unrecognized source shape fails loudly
@@ -128,7 +129,7 @@ rather than shipping a silently partial patch.
| # | Patcher | Library target | What it repairs | Stand-down predicate |
| --- | ---------------------------------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| 🔧¹ | `scripts/patch-wwebjs-201832.js` (+ `wwebjs-201832.patch`) | whatsapp-web.js models | WhatsApp Web 2.3000.x renamed the serialized message-id property `id._serialized` → `id.$1`; 1.34.7 reads the old name in the `Message` constructor and ~40 downstream sites, so message ids, acks, quoted-message resolution and media downloads break. Backports upstream fix #201832 (`Base._normalizeId()`). One known harmless reject on 1.34.7 (a LID-aware `Contact.js` path that does not exist there); any other reject aborts the build. | no-ops once `_normalizeId` exists upstream. Runtime double-check: `src/engine/adapters/wwebjs-backport-check.ts` detects an unpatched install and logs an error naming the fix as the wwjs session starts (`whatsapp-web-js.adapter.ts:430`). It is diagnostic, **not** preventive — startup continues, so a session reaching READY is not evidence the patch landed. |
+| 🔧¹ | `scripts/patch-wwebjs-201832.js` (+ `wwebjs-201832.patch`) | whatsapp-web.js models | WhatsApp Web 2.3000.x renamed the serialized message-id property `id._serialized` → `id.$1`; 1.34.7 reads the old name in the `Message` constructor and ~40 downstream sites, so message ids, acks, quoted-message resolution and media downloads break. Backports upstream fix #201832 (`Base._normalizeId()`). One known harmless reject on 1.34.7 (a LID-aware `Contact.js` path that does not exist there); any other reject aborts the build. | no-ops once `_normalizeId` exists upstream. Runtime double-check: `src/engine/adapters/wwebjs-backport-check.ts` detects an unpatched install and logs an error naming the fix as the wwjs session starts (`whatsapp-web-js.adapter.ts:446`). It is diagnostic, **not** preventive — startup continues, so a session reaching READY is not evidence the patch landed. |
| 🔧² | `scripts/patch-wwebjs-status.js` | whatsapp-web.js injected status send | Two independent breakages in current WhatsApp Web builds: (1) the `canCheckStatusRankingPosterGating()` helper is gone and its call threw before any status send — now called when present, `false` (pre-gating meaning) when not; (2) `sendStatusMediaMsgAction` changed signature from positional `(msg, mediaUpdate)` to a single options object — adopted from upstream PR #201816. The two edits of the media repair are all-or-nothing. | exact-shape match; unknown shape fails the build. |
| 🔧³ | `scripts/patch-wwebjs-newsletter-preview.js` | whatsapp-web.js `Injected/Utils.js` | Link-preview generation omitted the destination chat, so WhatsApp Web could not select the newsletter preview transport: `getLinkPreview(link)` → `getLinkPreview(link, chat)`. | exact-shape match; unknown shape fails the build. |
| 🔧⁴ | `scripts/patch-wwebjs-ready-sync.js` | whatsapp-web.js readiness pipeline | Two live-observed races: on a warm profile the page can reach `hasSynced=true` before the edge listener attaches (the whole post-auth pipeline silently never runs), and a partial `attachEventListeners` failure was swallowed (message bridge dead while sends still work). Adds an `eventsAttached` completion marker and fires the handler once when the level is already true; double-fire is deduped by the adapter. | exact-shape, one group all-or-nothing; unknown shape fails the build. |
@@ -139,23 +140,25 @@ rather than shipping a silently partial patch.
### 29.3.2 Which matrix rows depend on which patch
This is the patch visibility the matrix cells refer to. Every patch is engine-specific (5 on wwjs,
-1 on Baileys), and **no row carries a row-level patch mark on both engines**. The two column-wide
+2 on Baileys), and **no row carries a row-level patch mark on both engines**. The two column-wide
patches are a separate matter: 🔧¹ underwrites every wwjs cell and 🔧⁵ every baileys cell, so in
that sense every row does depend on a patch on each side. "Patch-dependent" below means the
row-level marks.
-| Patch | Matrix rows that depend on it |
-| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| 🔧¹ message-id backport | **The whole wwjs column** (header-marked, not repeated per row): every wwjs cell that sends, receives or resolves a message id. On unpatched 1.34.7 against WhatsApp Web ≥ 2.3000.x, sends return no message object and chat/media reads throw the minified `r: r`. Not row-specific, so the wwjs column header carries `🔧¹`. |
-| 🔧² status-send repair | `postTextStatus`, `postImageStatus`, `postVideoStatus`, `postVoiceStatus` — **wwjs cells only**. Stock 1.34.7 throws before any status send on current WhatsApp Web builds. These four rows are ✅ on both engines, but the wwjs side works only because of this patch. |
-| 🔧³ newsletter link preview | `sendTextMessage` (and any send carrying a link preview) **to a channel JID** on wwjs. Row-marked on `sendTextMessage` as the common case. |
-| 🔧⁴ ready-sync | `initialize` on wwjs (warm-restore readiness race). Row-marked. |
-| 🔧⁵ app-state resync bound | No single row — keeps the Baileys socket's app-state resync from spinning (~1000 wasted 60s queries/day). Connection health under **every baileys cell**; the baileys column header carries `🔧⁵`. |
-| 🔧⁶ newsletter-create parse | `createChannel` on **baileys** — without it the call always answers 500 and leaks the channel it just created. Row-marked. |
+| Patch | Matrix rows that depend on it |
+| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| 🔧¹ message-id backport | **The whole wwjs column** (header-marked, not repeated per row): every wwjs cell that sends, receives or resolves a message id. On unpatched 1.34.7 against WhatsApp Web ≥ 2.3000.x, sends return no message object and chat/media reads throw the minified `r: r`. Not row-specific, so the wwjs column header carries `🔧¹`. |
+| 🔧² status-send repair | `postTextStatus`, `postImageStatus`, `postVideoStatus`, `postVoiceStatus` — **wwjs cells only**. Stock 1.34.7 throws before any status send on current WhatsApp Web builds. These four rows are ✅ on both engines, but the wwjs side works only because of this patch. |
+| 🔧³ newsletter link preview | `sendTextMessage` (and any send carrying a link preview) **to a channel JID** on wwjs. Row-marked on `sendTextMessage` as the common case. |
+| 🔧⁴ ready-sync | `initialize` on wwjs (warm-restore readiness race). Row-marked. |
+| 🔧⁵ app-state resync bound | No single row — keeps the Baileys socket's app-state resync from spinning (~1000 wasted 60s queries/day). Connection health under **every baileys cell**; the baileys column header carries `🔧⁵`. |
+| 🔧⁶ newsletter-create parse | `createChannel` on **baileys** — without it the call always answers 500 and leaks the channel it just created. Row-marked. |
+| 🔧⁷ participant arity | `removeParticipants`, `promoteParticipants`, `demoteParticipants` on **wwjs**. Without it a request naming only non-members throws an arity assertion on removal, and promote/demote answer `200` for people WhatsApp never touched; the patch returns one boolean per REQUESTED id so the adapter reports a real per-participant outcome. Row-marked. |
Rows that are ✅ on **both** engines where one side is patch-dependent: `initialize` (🔧⁴ wwjs),
`sendTextMessage` (🔧³ wwjs), `postTextStatus` / `postImageStatus` / `postVideoStatus` /
-`postVoiceStatus` (🔧² wwjs). Everything else that is ✅-both carries no row-level mark, but still
+`postVoiceStatus` (🔧² wwjs), `removeParticipants` / `promoteParticipants` / `demoteParticipants`
+(🔧⁷ wwjs). Everything else that is ✅-both carries no row-level mark, but still
rests on the column-wide 🔧¹ (wwjs) and 🔧⁵ (baileys) — no row runs on stock library code on both
sides.
@@ -187,23 +190,23 @@ adapter and involves no library change.
Legend recap: **✅** supported · **✅🔧ⁿ** supported via OpenWA patch `🔧ⁿ` (29.3) ·
**❌ gap** adapter-gap · **❌ lib** library-limitation. Column headers carry the engine-wide
-patch dependencies (🔧¹ message-id backport + 🔧⁴ ready-sync on wwjs; 🔧⁵ app-state bound on
+patch dependencies (🔧¹ message-id backport on wwjs; 🔧⁵ app-state bound on
Baileys). The **OpenWA REST** column reads from the caller's side: ✅ works whatever engine the
session runs; ⚠️ depends on the session engine; ❌ 501 on both.
### 29.4.1 Session & connection
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| -------------------- | ------------------- | ------------------ | ----------- |
-| `initialize` | ✅ | ✅🔧⁴ | ✅ |
-| `disconnect` | ✅ | ✅ | ✅ |
-| `logout` | ✅ | ✅ | ✅ |
-| `destroy` | ✅ | ✅ | ✅ |
-| `forceDestroy` | ✅ | ✅ | ✅ |
-| `getQRCode` | ✅ | ✅ | ✅ |
-| `requestPairingCode` | ✅ | ✅ | ✅ |
-| `getStatus` | ✅ | ✅ | ✅ |
-| `probeLiveness` | ✅ local | ✅ round trip | ⚙️ internal |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| -------------------- | ------------------- | ---------------- | ----------- |
+| `initialize` | ✅ | ✅🔧⁴ | ✅ |
+| `disconnect` | ✅ | ✅ | ✅ |
+| `logout` | ✅ | ✅ | ✅ |
+| `destroy` | ✅ | ✅ | ✅ |
+| `forceDestroy` | ✅ | ✅ | ✅ |
+| `getQRCode` | ✅ | ✅ | ✅ |
+| `requestPairingCode` | ✅ | ✅ | ✅ |
+| `getStatus` | ✅ | ✅ | ✅ |
+| `probeLiveness` | ✅ local | ✅ round trip | ⚙️ internal |
`probeLiveness` is the one optional member of `IWhatsAppEngine`, and the two adapters answer it to
different depths — which is what the optional marker exists to allow. wwjs races a real
@@ -214,122 +217,122 @@ socket is caught by the transport instead. No REST route: the session watchdog p
### 29.4.2 Sending messages
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| --------------------- | ------------------- | ------------------ | --------------- |
-| `sendTextMessage` | ✅ | ✅🔧³ | ✅ |
-| `sendImageMessage` | ✅ | ✅ | ✅ |
-| `sendVideoMessage` | ✅ | ✅ | ✅ |
-| `sendAudioMessage` | ✅ | ✅ | ✅ |
-| `sendDocumentMessage` | ✅ | ✅ | ✅ |
-| `sendStickerMessage` | ✅ | ✅ | ✅ |
-| `sendContactMessage` | ✅ | ✅ | ✅ |
-| `sendLocationMessage` | ✅ | ✅ | ✅ |
-| `sendPollMessage` | ✅ | ✅ | ✅ |
-| `sendProduct` | ✅ | ❌ lib | ⚠️ baileys only |
-| `sendCatalog` | ❌ lib | ❌ lib | ❌ 501 |
-| `replyToMessage` | ✅ | ✅ | ✅ |
-| `forwardMessage` | ✅ | ✅ | ✅ |
-| `sendChatState` | ✅ | ✅ | ✅ |
-| `sendSeen` | ✅ | ✅ | ✅ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| --------------------- | ------------------- | ---------------- | --------------- |
+| `sendTextMessage` | ✅ | ✅🔧³ | ✅ |
+| `sendImageMessage` | ✅ | ✅ | ✅ |
+| `sendVideoMessage` | ✅ | ✅ | ✅ |
+| `sendAudioMessage` | ✅ | ✅ | ✅ |
+| `sendDocumentMessage` | ✅ | ✅ | ✅ |
+| `sendStickerMessage` | ✅ | ✅ | ✅ |
+| `sendContactMessage` | ✅ | ✅ | ✅ |
+| `sendLocationMessage` | ✅ | ✅ | ✅ |
+| `sendPollMessage` | ✅ | ✅ | ✅ |
+| `sendProduct` | ✅ | ❌ lib | ⚠️ baileys only |
+| `sendCatalog` | ❌ lib | ❌ lib | ❌ 501 |
+| `replyToMessage` | ✅ | ✅ | ✅ |
+| `forwardMessage` | ✅ | ✅ | ✅ |
+| `sendChatState` | ✅ | ✅ | ✅ |
+| `sendSeen` | ✅ | ✅ | ✅ |
### 29.4.3 Message management
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| --------------------- | ------------------- | ------------------ | ------------ |
-| `editMessage` | ✅ | ✅ | ✅ |
-| `deleteMessage` | ✅ | ✅ | ✅ |
-| `reactToMessage` | ✅ | ✅ | ✅ |
-| `starMessage` | ✅ | ✅ | ✅ |
-| `pinMessage` | ✅ | ✅ | ✅ |
-| `unpinMessage` | ✅ | ✅ | ✅ |
-| `getMessageReactions` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `votePoll` | ❌ lib | ✅ | ⚠️ wwjs only |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| --------------------- | ------------------- | ---------------- | ------------ |
+| `editMessage` | ✅ | ✅ | ✅ |
+| `deleteMessage` | ✅ | ✅ | ✅ |
+| `reactToMessage` | ✅ | ✅ | ✅ |
+| `starMessage` | ✅ | ✅ | ✅ |
+| `pinMessage` | ✅ | ✅ | ✅ |
+| `unpinMessage` | ✅ | ✅ | ✅ |
+| `getMessageReactions` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `votePoll` | ❌ lib | ✅ | ⚠️ wwjs only |
### 29.4.4 Chats
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| ------------------- | ------------------- | ------------------ | ------------ |
-| `getChats` | ✅ | ✅ | ✅ |
-| `getChatHistory` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `archiveChat` | ✅ | ✅ | ✅ |
-| `clearChatMessages` | ✅ | ✅ | ✅ |
-| `deleteChat` | ✅ | ✅ | ✅ |
-| `markUnread` | ✅ | ✅ | ✅ |
-| `muteChat` | ✅ | ✅ | ✅ |
-| `pinChat` | ✅ | ✅ | ✅ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| ------------------- | ------------------- | ---------------- | ------------ |
+| `getChats` | ✅ | ✅ | ✅ |
+| `getChatHistory` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `archiveChat` | ✅ | ✅ | ✅ |
+| `clearChatMessages` | ✅ | ✅ | ✅ |
+| `deleteChat` | ✅ | ✅ | ✅ |
+| `markUnread` | ✅ | ✅ | ✅ |
+| `muteChat` | ✅ | ✅ | ✅ |
+| `pinChat` | ✅ | ✅ | ✅ |
### 29.4.5 Contacts
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| --------------------- | ------------------- | ------------------ | ----------- |
-| `getContacts` | ✅ | ✅ | ✅ |
-| `getContactById` | ✅ | ✅ | ✅ |
-| `upsertContact` | ✅ | ✅ | ✅ |
-| `deleteContact` | ✅ | ✅ | ✅ |
-| `blockContact` | ✅ | ✅ | ✅ |
-| `unblockContact` | ✅ | ✅ | ✅ |
-| `getBlockedContacts` | ✅ | ✅ | ✅ |
-| `checkNumberExists` | ✅ | ✅ | ✅ |
-| `getNumberId` | ✅ | ✅ | ✅ |
-| `getPhoneNumber` | ✅ | ✅ | ✅ |
-| `getPushName` | ✅ | ✅ | ✅ |
-| `resolveContactPhone` | ✅ | ✅ | ✅ |
-| `getProfilePicture` | ✅ | ✅ | ✅ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| --------------------- | ------------------- | ---------------- | ----------- |
+| `getContacts` | ✅ | ✅ | ✅ |
+| `getContactById` | ✅ | ✅ | ✅ |
+| `upsertContact` | ✅ | ✅ | ✅ |
+| `deleteContact` | ✅ | ✅ | ✅ |
+| `blockContact` | ✅ | ✅ | ✅ |
+| `unblockContact` | ✅ | ✅ | ✅ |
+| `getBlockedContacts` | ✅ | ✅ | ✅ |
+| `checkNumberExists` | ✅ | ✅ | ✅ |
+| `getNumberId` | ✅ | ✅ | ✅ |
+| `getPhoneNumber` | ✅ | ✅ | ✅ |
+| `getPushName` | ✅ | ✅ | ✅ |
+| `resolveContactPhone` | ✅ | ✅ | ✅ |
+| `getProfilePicture` | ✅ | ✅ | ✅ |
### 29.4.6 Groups
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| -------------------------------- | ------------------- | ------------------ | --------------- |
-| `createGroup` | ✅ | ❌ | ✅ |
-| `getGroups` | ✅ | ✅ | ✅ |
-| `getGroupInfo` | ✅ | ✅ | ✅ |
-| `addParticipants` | ✅ | ✅ | ✅ |
-| `removeParticipants` | ✅ | ✅🔧⁷ | ✅ |
-| `promoteParticipants` | ✅ | ✅🔧⁷ | ✅ |
-| `demoteParticipants` | ✅ | ✅🔧⁷ | ✅ |
-| `approveGroupMembershipRequests` | ✅ | ✅ | ✅ |
-| `rejectGroupMembershipRequests` | ✅ | ✅ | ✅ |
-| `getGroupMembershipRequests` | ✅ | ✅ | ✅ |
-| `leaveGroup` | ✅ | ✅ | ✅ |
-| `getGroupInviteCode` | ✅ | ✅ | ✅ |
-| `joinGroupViaInviteCode` | ✅ | ✅ | ✅ |
-| `revokeGroupInviteCode` | ✅ | ✅ | ✅ |
-| `getGroupJoinInfo` | ✅ | ✅ | ✅ |
-| `setGroupSubject` | ✅ | ✅ | ✅ |
-| `setGroupDescription` | ✅ | ✅ | ✅ |
-| `setGroupPicture` | ✅ | ✅ | ✅ |
-| `deleteGroupPicture` | ✅ | ✅ | ✅ |
-| `setGroupMessagesAdminsOnly` | ✅ | ✅ | ✅ |
-| `setGroupInfoAdminsOnly` | ✅ | ✅ | ✅ |
-| `setGroupMemberAddMode` | ✅ | ✅ | ✅ |
-| `setGroupEphemeral` | ✅ | ❌ lib | ⚠️ baileys only |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| -------------------------------- | ------------------- | ---------------- | --------------- |
+| `createGroup` | ✅ | ❌ | ✅ |
+| `getGroups` | ✅ | ✅ | ✅ |
+| `getGroupInfo` | ✅ | ✅ | ✅ |
+| `addParticipants` | ✅ | ✅ | ✅ |
+| `removeParticipants` | ✅ | ✅🔧⁷ | ✅ |
+| `promoteParticipants` | ✅ | ✅🔧⁷ | ✅ |
+| `demoteParticipants` | ✅ | ✅🔧⁷ | ✅ |
+| `approveGroupMembershipRequests` | ✅ | ✅ | ✅ |
+| `rejectGroupMembershipRequests` | ✅ | ✅ | ✅ |
+| `getGroupMembershipRequests` | ✅ | ✅ | ✅ |
+| `leaveGroup` | ✅ | ✅ | ✅ |
+| `getGroupInviteCode` | ✅ | ✅ | ✅ |
+| `joinGroupViaInviteCode` | ✅ | ✅ | ✅ |
+| `revokeGroupInviteCode` | ✅ | ✅ | ✅ |
+| `getGroupJoinInfo` | ✅ | ✅ | ✅ |
+| `setGroupSubject` | ✅ | ✅ | ✅ |
+| `setGroupDescription` | ✅ | ✅ | ✅ |
+| `setGroupPicture` | ✅ | ✅ | ✅ |
+| `deleteGroupPicture` | ✅ | ✅ | ✅ |
+| `setGroupMessagesAdminsOnly` | ✅ | ✅ | ✅ |
+| `setGroupInfoAdminsOnly` | ✅ | ✅ | ✅ |
+| `setGroupMemberAddMode` | ✅ | ✅ | ✅ |
+| `setGroupEphemeral` | ✅ | ❌ lib | ⚠️ baileys only |
### 29.4.7 Channels
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| -------------------------- | ------------------- | ------------------ | --------------- |
-| `createChannel` | ✅🔧⁶ | ✅ | ✅ |
-| `deleteChannel` | ✅ | ✅ | ✅ |
-| `muteChannel` | ✅ | ✅ | ✅ |
-| `demoteChannelAdmin` | ✅ | ❌ lib | ⚠️ baileys only |
-| `transferChannelOwnership` | ✅ | ❌ lib | ⚠️ baileys only |
-| `getChannelById` | ✅ | ✅ | ✅ |
-| `getChannelMessages` | ❌ gap | ✅ | ⚠️ wwjs only |
-| `getSubscribedChannels` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `subscribeToChannel` | ✅ | ❌ gap | ⚠️ baileys only |
-| `unsubscribeFromChannel` | ✅ | ✅ | ✅ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| -------------------------- | ------------------- | ---------------- | --------------- |
+| `createChannel` | ✅🔧⁶ | ✅ | ✅ |
+| `deleteChannel` | ✅ | ✅ | ✅ |
+| `muteChannel` | ✅ | ✅ | ✅ |
+| `demoteChannelAdmin` | ✅ | ❌ lib | ⚠️ baileys only |
+| `transferChannelOwnership` | ✅ | ❌ lib | ⚠️ baileys only |
+| `getChannelById` | ✅ | ✅ | ✅ |
+| `getChannelMessages` | ❌ gap | ✅ | ⚠️ wwjs only |
+| `getSubscribedChannels` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `subscribeToChannel` | ✅ | ❌ gap | ⚠️ baileys only |
+| `unsubscribeFromChannel` | ✅ | ✅ | ✅ |
### 29.4.8 Status / stories
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| -------------------- | ------------------- | ------------------ | ------------ |
-| `postTextStatus` | ✅ | ✅🔧² | ✅ |
-| `postImageStatus` | ✅ | ✅🔧² | ✅ |
-| `postVideoStatus` | ✅ | ✅🔧² | ✅ |
-| `postVoiceStatus` | ✅ | ✅🔧² | ✅ |
-| `deleteStatus` | ✅ | ✅ | ✅ |
-| `getContactStatus` | ❌ lib | ✅ | ✅ (store) ‡ |
-| `getContactStatuses` | ❌ lib | ✅ | ✅ (store) ‡ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| -------------------- | ------------------- | ---------------- | ------------ |
+| `postTextStatus` | ✅ | ✅🔧² | ✅ |
+| `postImageStatus` | ✅ | ✅🔧² | ✅ |
+| `postVideoStatus` | ✅ | ✅🔧² | ✅ |
+| `postVoiceStatus` | ✅ | ✅🔧² | ✅ |
+| `deleteStatus` | ✅ | ✅ | ✅ |
+| `getContactStatus` | ❌ lib | ✅ | ✅ (store) ‡ |
+| `getContactStatuses` | ❌ lib | ✅ | ✅ (store) ‡ |
‡ Status **reads** are served from `StatusStoreService` (fed by inbound status ingestion on both
engines), not by calling the engine — so the REST API is engine-neutral here even though the
@@ -338,42 +341,42 @@ answers 501.
### 29.4.9 Labels (WA Business)
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| --------------------- | ------------------- | ------------------ | --------------- |
-| `getLabels` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `getLabelById` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `getChatLabels` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `getChatsByLabel` | ❌ lib | ✅ | ⚠️ wwjs only |
-| `addLabelToChat` | ✅ | ✅ | ✅ |
-| `removeLabelFromChat` | ✅ | ✅ | ✅ |
-| `upsertLabel` | ✅ | ❌ lib | ⚠️ baileys only |
-| `deleteLabel` | ✅ | ❌ lib | ⚠️ baileys only |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| --------------------- | ------------------- | ---------------- | --------------- |
+| `getLabels` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `getLabelById` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `getChatLabels` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `getChatsByLabel` | ❌ lib | ✅ | ⚠️ wwjs only |
+| `addLabelToChat` | ✅ | ✅ | ✅ |
+| `removeLabelFromChat` | ✅ | ✅ | ✅ |
+| `upsertLabel` | ✅ | ❌ lib | ⚠️ baileys only |
+| `deleteLabel` | ✅ | ❌ lib | ⚠️ baileys only |
### 29.4.10 Catalog & products (WA Business)
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| ------------- | ------------------- | ------------------ | --------------- |
-| `getCatalog` | ✅ | ❌ lib | ⚠️ baileys only |
-| `getProducts` | ✅ | ❌ lib | ⚠️ baileys only |
-| `getProduct` | ✅ | ❌ lib | ⚠️ baileys only |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| ------------- | ------------------- | ---------------- | --------------- |
+| `getCatalog` | ✅ | ❌ lib | ⚠️ baileys only |
+| `getProducts` | ✅ | ❌ lib | ⚠️ baileys only |
+| `getProduct` | ✅ | ❌ lib | ⚠️ baileys only |
### 29.4.11 Own profile & presence
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| ---------------------- | ------------------- | ------------------ | ----------- |
-| `setProfileName` | ✅ | ✅ | ✅ |
-| `setProfilePicture` | ✅ | ✅ | ✅ |
-| `deleteProfilePicture` | ✅ | ✅ | ✅ |
-| `setProfileStatus` | ✅ | ✅ | ✅ |
-| `setOnlinePresence` | ✅ | ✅ | ✅ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| ---------------------- | ------------------- | ---------------- | ----------- |
+| `setProfileName` | ✅ | ✅ | ✅ |
+| `setProfilePicture` | ✅ | ✅ | ✅ |
+| `deleteProfilePicture` | ✅ | ✅ | ✅ |
+| `setProfileStatus` | ✅ | ✅ | ✅ |
+| `setOnlinePresence` | ✅ | ✅ | ✅ |
### 29.4.12 Presence & calls
-| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ ⁴ | OpenWA REST |
-| --------------------- | ------------------- | ------------------ | --------------- |
-| `subscribeToPresence` | ✅ | ❌ lib | ⚠️ baileys only |
-| `rejectCall` | ✅ | ✅ | ✅ |
-| `createCallLink` | ✅ | ✅ | ✅ |
+| Method | Baileys adapter 🔧⁵ | wwjs adapter 🔧¹ | OpenWA REST |
+| --------------------- | ------------------- | ---------------- | --------------- |
+| `subscribeToPresence` | ✅ | ❌ lib | ⚠️ baileys only |
+| `rejectCall` | ✅ | ✅ | ✅ |
+| `createCallLink` | ✅ | ✅ | ✅ |
**Totals:** 112 methods → 224 adapter cells: **199 ✅, 25 ❌** (2 adapter-gaps, 23
library-limitations, 0 uncertain) across 24 methods. From the REST caller's side: **90** methods
diff --git a/src/engine/docs-29-counts.spec.ts b/src/engine/docs-29-counts.spec.ts
index c343b4451..7b0808aa2 100644
--- a/src/engine/docs-29-counts.spec.ts
+++ b/src/engine/docs-29-counts.spec.ts
@@ -86,8 +86,25 @@ describe('docs/29 counts match the capability matrix', () => {
expect(expected.total).toBeGreaterThan(4);
expect(expected.wwjs + expected.baileys).toBe(expected.total);
+ // 29.3's opening sentence and 29.3.2's split spell the figure in prose rather than digits, which
+ // is why they drifted while the digit-shaped claims held: a patcher was added to each library and
+ // the words stayed at "five" and "1 on Baileys".
+ const WORDS: Record<string, number> = { four: 4, five: 5, six: 6, seven: 7, eight: 8, nine: 9, ten: 10 };
+ const spelled = doc.match(/OpenWA ships (\w+) exact, self-disabling source transforms/);
+ const wrongProse: string[] = [];
+ if (!spelled) wrongProse.push('29.3 opening: phrasing no longer found in the document');
+ else if (WORDS[spelled[1]] !== expected.total) {
+ wrongProse.push(`29.3 opening: says ${spelled[1]}, scripts/ has ${expected.total}`);
+ }
+
const claims: { label: string; re: RegExp; want: number }[] = [
{ label: 'intro total', re: /(\d+) install-time patches \(29\.3\)/, want: expected.total },
+ { label: '29.3.2 split wwjs', re: /engine-specific \((\d+) on wwjs/, want: expected.wwjs },
+ {
+ label: '29.3.2 split baileys',
+ re: /engine-specific \(\d+ on wwjs,\s*(\d+) on Baileys\)/,
+ want: expected.baileys,
+ },
{ label: 'mermaid wwjs node', re: /whatsapp-web\.js [\d.]+<br\/>\+ (\d+) OpenWA patch/, want: expected.wwjs },
{ label: 'mermaid baileys node', re: /baileys [\w.-]+<br\/>\+ (\d+) OpenWA patch/, want: expected.baileys },
{ label: '29.8 total', re: /- \*\*(\d+)\*\* install-time patches/, want: expected.total },
@@ -111,7 +128,7 @@ describe('docs/29 counts match the capability matrix', () => {
if (actual !== claim.want) wrong.push(`${claim.label}: says ${actual}, scripts/ has ${claim.want}`);
}
- expect(wrong).toEqual([]);
+ expect([...wrongProse, ...wrong]).toEqual([]);
});
it('states the same figures everywhere it states them', () => {