fix: Encoded spaces in chatwoot webhook

This commit is contained in:
Davidson Gomes
2023-07-31 10:55:24 -03:00
parent 66d06afaf7
commit 9ea1eaf3ed
2 changed files with 3 additions and 2 deletions

View File

@@ -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) {