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

@ -7,6 +7,7 @@
### Fixed ### Fixed
* Solved problem when disconnecting from the instance the instance was deleted * Solved problem when disconnecting from the instance the instance was deleted
* Encoded spaces in chatwoot webhook
### Integrations ### Integrations

View File

@ -188,7 +188,7 @@ export class InstanceController {
this.chatwootService.initInstanceChatwoot( this.chatwootService.initInstanceChatwoot(
instance, instance,
instance.instanceName.split('-cwId-')[0], instance.instanceName.split('-cwId-')[0],
`${urlServer}/chatwoot/webhook/${instance.instanceName}`, `${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`,
qrcode, qrcode,
number, number,
); );
@ -216,7 +216,7 @@ export class InstanceController {
conversation_pending: chatwoot_conversation_pending || false, conversation_pending: chatwoot_conversation_pending || false,
number, number,
name_inbox: instance.instanceName, name_inbox: instance.instanceName,
webhook_url: `${urlServer}/chatwoot/webhook/${instance.instanceName}`, webhook_url: `${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`,
}, },
}; };
} catch (error) { } catch (error) {