Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(changelog): record the participant batch truth repair

Yudhi Armyndharis2cd694397481
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81813eff1..416a5d83a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Removing, promoting or demoting group participants on the whatsapp-web.js engine now reports which participants WhatsApp actually acted on. The library resolves each requested id against the group's own member list and silently drops what it cannot find, so a request naming only non-members answered `500` for removal — the empty batch tripped an arity assertion — while promotion and demotion answered `200` claiming success for people WhatsApp never touched. Such a request now answers `403`, and a mixed request reports the untouched entries as `404` instead of confirming them. An installation whose `node_modules` predates this release keeps the previous behaviour for the reporting half; the `500` is closed either way. Refs #1220.
- A group participant id that does not name an individual — free text, a group id, a number too short to be one — is now rejected with `400` naming the offending entries, instead of being handed to the engine. On whatsapp-web.js such an id reached the page-side `createWid`, which threw an error the minified bundle reports without a name, so the caller received a `500` that could not be diagnosed from either end. The check covers group creation and adding, removing, promoting and demoting participants, and it sits in the service rather than the request body so the MCP tools are guarded on the same terms as the REST routes. Refs #1220.
- Creating a channel on the Baileys engine no longer answers `500` while leaving the channel behind. The library's response parser read `thread.picture.id` eagerly, but its create call sends only a name and description and has no picture parameter, so the picture was absent on every create and the parse threw after WhatsApp had already created the newsletter — and because the operation is non-idempotent, a client retrying the `500` leaked one orphan channel per attempt, invisible through the API since `getSubscribedChannels` is not available on that engine. A new install-time patch reads the response defensively so the call succeeds and returns the new channel's id, which is the only place that id appears.
- A profile-picture lookup that fails on the whatsapp-web.js engine now answers `503` instead of `{"url": null}`, which is what the route already documented. whatsapp-web.js resolves `undefined` for the only legitimate negative — no picture, or hidden by privacy — so every error reaching the adapter was a failure being reported as "this contact has no avatar". The batch route keeps its best-effort `null`, having no per-id error channel. A dead page during a single-contact lookup likewise stops reading as `404`.