From fed49c207264024bbf2e31114eff48543ed28b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Paulillo?= Date: Mon, 2 Sep 2024 20:39:11 -0300 Subject: [PATCH 1/3] Fixes wrong message type lookup --- src/api/integrations/channel/meta/whatsapp.business.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/channel/meta/whatsapp.business.service.ts b/src/api/integrations/channel/meta/whatsapp.business.service.ts index 713c8aca..dbb00c36 100644 --- a/src/api/integrations/channel/meta/whatsapp.business.service.ts +++ b/src/api/integrations/channel/meta/whatsapp.business.service.ts @@ -321,7 +321,7 @@ export class BusinessStartupService extends ChannelStartupService { try { const message: any = received; - const id = message[message.type].id; + const id = message.messages[0][messageRaw.messageType].id; let urlServer = this.configService.get('WA_BUSINESS').URL; const version = this.configService.get('WA_BUSINESS').VERSION; urlServer = `${urlServer}/${version}/${id}`; From 1db339c65fa7a782b9b7424857b399d4f5699695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Paulillo?= Date: Tue, 3 Sep 2024 12:13:30 -0300 Subject: [PATCH 2/3] Declares instanceDto.chatwootAutoCreate --- src/api/dto/instance.dto.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/dto/instance.dto.ts b/src/api/dto/instance.dto.ts index 81fd7132..8f0a2922 100644 --- a/src/api/dto/instance.dto.ts +++ b/src/api/dto/instance.dto.ts @@ -23,6 +23,7 @@ export class InstanceDto extends IntegrationDto { proxyProtocol?: string; proxyUsername?: string; proxyPassword?: string; + chatwootAutoCreate?: boolean; } export class SetPresenceDto { From b0aa29985025d913b107384ca1735618ed41ac9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Paulillo?= Date: Tue, 3 Sep 2024 12:25:02 -0300 Subject: [PATCH 3/3] Hotfixes attribution --- src/api/integrations/channel/meta/whatsapp.business.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/channel/meta/whatsapp.business.service.ts b/src/api/integrations/channel/meta/whatsapp.business.service.ts index dbb00c36..47bdab35 100644 --- a/src/api/integrations/channel/meta/whatsapp.business.service.ts +++ b/src/api/integrations/channel/meta/whatsapp.business.service.ts @@ -321,7 +321,7 @@ export class BusinessStartupService extends ChannelStartupService { try { const message: any = received; - const id = message.messages[0][messageRaw.messageType].id; + const id = message.messages[0][message.messages[0].type].id; let urlServer = this.configService.get('WA_BUSINESS').URL; const version = this.configService.get('WA_BUSINESS').VERSION; urlServer = `${urlServer}/${version}/${id}`;