diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a37833f..ecd9d9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Fixed * Solved problem when disconnecting from the instance the instance was deleted +* Encoded spaces in chatwoot webhook ### Integrations diff --git a/src/whatsapp/controllers/instance.controller.ts b/src/whatsapp/controllers/instance.controller.ts index 1434d5da..04f45a4a 100644 --- a/src/whatsapp/controllers/instance.controller.ts +++ b/src/whatsapp/controllers/instance.controller.ts @@ -188,7 +188,7 @@ export class InstanceController { this.chatwootService.initInstanceChatwoot( instance, instance.instanceName.split('-cwId-')[0], - `${urlServer}/chatwoot/webhook/${instance.instanceName}`, + `${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`, qrcode, number, ); @@ -216,7 +216,7 @@ export class InstanceController { conversation_pending: chatwoot_conversation_pending || false, number, name_inbox: instance.instanceName, - webhook_url: `${urlServer}/chatwoot/webhook/${instance.instanceName}`, + webhook_url: `${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`, }, }; } catch (error) {