Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(changelog): declare the Go SDK type change as breaking

Yudhi Armyndharis1e7f5a73beff
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 679e54134..f012d1845 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The Baileys message-store round-trip test now exercises the serialization it names. Its fixture carried no binary field, so the assertions held under any replacer/reviver pair — including identity — and a regression in the BufferJSON round-trip could not fail CI, on rows that reply, forward, react and delete-by-id resolve against. The fixture now carries bytes, a new spec pins the encoded wire form, and both are checked against an identity codec so neither can go vacuous again.
-- The Go SDK can now clear a webhook's `secret`, `headers` and `filters`, and a template's `header` and `footer`. Every field carried `omitempty` over a value type, so the values the server reads as "remove this" marshalled away to nothing: the request body came out `{}` and the stored values survived while the call reported success. Secret, headers, header and footer are now pointers, and a new `ClearFilters` flag emits the explicit `null` the server reads — which no struct tag can express for a nil pointer, and which dropping `omitempty` would have sent on every update instead.
+- ⚠️ **Breaking (Go SDK).** The Go client can now send the values that clear a field. `UpdateWebhookRequest.Secret`, `.Headers` and `UpdateTemplateRequest.Header`/`.Footer` become pointers, and a `ClearFilters` flag emits the explicit `null` the server reads. They carried `omitempty` over value types, so the values the server reads as "remove this" marshalled away to nothing: the request body came out `{}` and the stored values survived while the call reported success. Action required: Go code assigning these fields directly no longer compiles — take the address of a variable (`s := ""; req.Secret = &s`) or leave the field nil to mean "leave it alone". The four other clients are unaffected.
- The addressbook write guard now checks the id, not just its domain. `parseWaId('NOT A [email protected]').kind` is `'user'`, so free text, letters and an empty user-part cleared the guard, reached the engine and were reported to the caller as a saved contact — for an entry keyed by something that is not a phone number. It now applies `isIndividualWid`, the same predicate the group-participant, channel-admin and message-mention surfaces already use on these very shapes.
@@ -50,7 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The three group-picture routes now refuse an id that does not name a group. They reuse the account's own profile-picture primitives, and Baileys omits the `target` attribute whenever the jid is the account's own — so `PUT` or `DELETE /sessions/:id/groups/<own-jid>/picture` replaced or permanently deleted the WhatsApp account's own avatar and answered `{success: true}`, while whatsapp-web.js refused the same input with a 404. Both engines now reject it with a 400 before the id reaches either adapter.
-- `GET /sessions/:sessionId/messages` and the MCP `MessageList` tool now bound the inline media they return, via `MESSAGE_LIST_INLINE_MEDIA_BUDGET_BYTES` (8 MiB of encoded base64 by default). The row count was clamped to 1..100, but a row is not a bounded object: each carries its base64 in `metadata.media.data`, so a hundred media rows serialised to well over a hundred megabytes, and a large enough page pushed `JSON.stringify` past its ceiling and failed the read outright — permanently for the dashboard, which requests the maximum page size with no way to ask for less. The budget is spent newest-first; past it a payload is replaced with the `{ omitted: true, sizeBytes }` marker the engine already emits for skipped inbound media, and remains fetchable from the per-message media route.
+- `GET /sessions/:sessionId/messages` and the MCP `MessageList` tool now bound the inline media they return, via `MESSAGE_LIST_INLINE_MEDIA_BUDGET_BYTES` (8 MiB of encoded base64 by default). The row count was clamped to 1..100, but a row is not a bounded object: each carries its base64 in `metadata.media.data`, so a hundred media rows serialised to well over a hundred megabytes, and a large enough page pushed `JSON.stringify` past its ceiling and failed the read outright — permanently for the dashboard, which requests the maximum page size with no way to ask for less. The budget is spent newest-first; past it a payload is replaced with the `{ omitted: true, sizeBytes }` marker the engine already emits for skipped inbound media, and remains fetchable from the per-message media route. In the dashboard a trimmed message shows the same 📎 Media placeholder it already uses for media the engine skipped on the way in, and `MESSAGE_LIST_INLINE_MEDIA_BUDGET_BYTES` raises the budget for a deployment that would rather pay the bytes.
- Bulk send now caps its rendered result at `TEMPLATE_RENDER_MAX_CHARS` (default 64 KiB), the same limit the single-send template path already enforced. `content.text` is length-validated before substitution, so caller-supplied variables inflated each item without bound while the request body stayed far below the in-flight body budget — a few hundred KiB of variables became hundreds of megabytes of heap per item, then went to the engine and the `messages.body` column. An over-cap render now fails that item with a message naming the limit, exactly as a pacing refusal does, rather than being truncated silently or sent.