Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(changelog): record the mute/pin transport split
Yudhi Armyndharis9b0d90229767
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c5e1b7e9b..e8acec209 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Five whatsapp-web.js chat operations — mark-as-read, clear, archive, mark-unread and delete — no longer report a dead browser as a refusal. Each caught every error and resolved `false`, so the caller got `200 {"success": false}` ("WhatsApp declined a valid request") while the session's page was actually dead, and retried against it instead of receiving the documented 503. The early death signal was lost too, so the session kept reporting READY until the slower watchdog noticed. They now split transport failure out into `EngineTransportError` and report it, exactly as `getChats` and the other sibling reads in the same adapter already did. An ordinary page-side refusal still resolves `false`, unchanged.+- `POST /sessions/:id/chats/mute` and `/pin` answer 503 rather than 400 when the whatsapp-web.js page is dead. Both resolve the chat first, and that resolution swallowed every rejection into "no such chat" — so a dead page, the state in which nothing resolves at all, was reported as `400 Chat <id> does not exist on this session`, naming the caller's input as the fault and telling a retry loop to stop during the outage a retry is for. 503 was already a published response on both routes; what changes is that a transport failure now reaches it instead of being relabelled. An id the page genuinely does not know still answers the documented 400.+- The cross-node takeover sweep no longer adopts sessions while the process is shutting down. `onModuleDestroy` cleared the interval, which stops the next sweep but does nothing about one already running — it is neither aborted nor awaited, and nothing on the start path consulted a shutting-down signal. On a rolling restart a sweep mid-flight could construct and register an engine after the shutdown path had emptied the registry, and claim the ownership lease for a process about to exit, pinning that session to a dead node until the lease lapsed. The signal is re-checked per adoption, because each one costs a browser launch and the loop spans much of the sweep interval.- `GET /infra/storage/export` now enumerates the whole store. It listed with `listFiles()`, which stops at `STORAGE_LIST_MAX_FILES` and returns without logging or throwing, so an operator following the documented local→S3 migration — export, repoint `STORAGE_TYPE`, import — silently left media behind on the backend they were about to decommission, and the `files/count` pre-check was truncated by the same code path, so their own consistency check could not reveal it. The export now walks the uncapped `iterateFiles()`, which exists for exactly this: the cap is a per-call guard, not a completeness contract. The `files/count` pre-check an operator runs before that migration walks the same uncapped list, so it can no longer hide the gap it exists to reveal.