Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
chore: fixtures and changelog for the wider ChatSummary
Surya10e2f3d8a65c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 767b51e08..2a4cfd19b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -13,13 +13,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0engine, for large accounts whose reads fail with `Runtime.callFunctionOn timed out`. Unset keepsPuppeteer's own budget, so nothing changes for a deployment that does not set it. The gatewayrefuses to boot on `0` or on a value above 2147483647; see docs/12 for when to reach for it.-- `GET /sessions/{sessionId}/chats` reports each chat's `archived` state. The archive/unarchive- action (`POST /sessions/{sessionId}/chats/archive`) already existed; the chat list just never- reported the resulting state back, so a consumer had no way to filter archived chats out of (or- into) its own view.+- `GET /sessions/{sessionId}/chats` reports each chat's `archived`, `pinned` and `muted` state.+ The matching actions (`POST /sessions/{sessionId}/chats/archive`, `/pin`, `/mute`) already+ existed; the chat list never reported the resulting state back, so a consumer had no way to+ filter archived chats out of its own view, order pinned chats first, or honour a mute — and+ whatsapp-web.js's `chat_archived` event is deliberately not wired, so there was no event+ fallback either.### Changed+- `ChatSummary` grew three required fields (`archived`, `pinned`, `muted`), so the chat-list shape+ is wider than it was. Every producer sets them and the SDK type files carry them, but code+ holding a hand-built `ChatSummary` — a test fixture, a mock, a stub gateway — has to supply the+ three. Required rather than optional so "not muted" never has to be read out of an absent field.- A whatsapp-web.js protocol timeout is no longer eligible to be classified as a dead page.Behaviour is unchanged on the current Puppeteer; the guard keeps a future bump from reporting aslow command as a transport death.diff --git a/dashboard/src/pages/Chats.test.ts b/dashboard/src/pages/Chats.test.tsindex 68426d46e..a840c78b7 100644--- a/dashboard/src/pages/Chats.test.ts+++ b/dashboard/src/pages/Chats.test.ts@@ -37,6 +37,9 @@ const CHAT: Chat = {unreadCount: 2,timestamp: 1_700_000_000,lastMessage: 'hello from alice',+ archived: false,+ pinned: false,+ muted: false,};// A second conversation, so the attachment tests can distinguish "closed and reopened the SAME@@ -50,6 +53,9 @@ const CHAT_2: Chat = {unreadCount: 0,timestamp: 1_700_000_050,lastMessage: 'hello from carol',+ archived: false,+ pinned: false,+ muted: false,};const DB_MESSAGE: ChatMessage = {