fix: Encoded spaces in chatwoot webhook

This commit is contained in:
Davidson Gomes 2023-07-31 12:34:01 -03:00
parent 8afcfde078
commit 2637aebb7f
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ export class ChatwootController {
const response = {
...result,
webhook_url: `${urlServer}/chatwoot/webhook/${instance.instanceName}`,
webhook_url: `${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`,
};
return response;
@ -78,7 +78,7 @@ export class ChatwootController {
const response = {
...result,
webhook_url: `${urlServer}/chatwoot/webhook/${instance.instanceName}`,
webhook_url: `${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`,
};
return response;

View File

@ -94,7 +94,7 @@ export class WAMonitoringService {
if (findChatwoot && findChatwoot.enabled) {
chatwoot = {
...findChatwoot,
webhook_url: `${urlServer}/chatwoot/webhook/${key}`,
webhook_url: `${urlServer}/chatwoot/webhook/${encodeURIComponent(key)}`,
};
}