Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(status): allow webhooks to subscribe to the status.received event
Yudhi Armyndharisf8cdf0fe7545
diff --git a/openapi.json b/openapi.jsonindex 1ffbac5db..a07b451d6 100644--- a/openapi.json+++ b/openapi.json@@ -6377,6 +6377,7 @@"message.revoked","message.reaction","message.edited",+ "status.received","session.status","session.qr","session.authenticated",@@ -6522,6 +6523,7 @@"message.revoked","message.reaction","message.edited",+ "status.received","session.status","session.qr","session.authenticated",diff --git a/src/modules/webhook/dto/webhook.dto.spec.ts b/src/modules/webhook/dto/webhook.dto.spec.tsindex bee10cf01..ddc0c0863 100644--- a/src/modules/webhook/dto/webhook.dto.spec.ts+++ b/src/modules/webhook/dto/webhook.dto.spec.ts@@ -23,6 +23,12 @@ describe('webhook DTO event validation', () => {).toHaveLength(0);});+ it("CreateWebhookDto: accepts 'status.received'", async () => {+ expect(+ await errorsFor(CreateWebhookDto, { url: 'https://x.example/hook', events: ['status.received'] }),+ ).toHaveLength(0);+ });+it('UpdateWebhookDto: rejects an empty events array (ArrayMinSize parity)', async () => {const errs = await errorsFor(UpdateWebhookDto, { events: [] });expect(errs.some(e => e.property === 'events')).toBe(true);diff --git a/src/modules/webhook/dto/webhook.dto.ts b/src/modules/webhook/dto/webhook.dto.tsindex ee59e321c..3e79c5e09 100644--- a/src/modules/webhook/dto/webhook.dto.ts+++ b/src/modules/webhook/dto/webhook.dto.ts@@ -42,6 +42,7 @@ export const WEBHOOK_EVENTS = ['message.revoked','message.reaction','message.edited',+ 'status.received','session.status','session.qr','session.authenticated',