diff --git a/src/services/whatsApp/webhookService.ts b/src/services/whatsApp/webhookService.ts index adbab1d..0a53d2b 100644 --- a/src/services/whatsApp/webhookService.ts +++ b/src/services/whatsApp/webhookService.ts @@ -11,13 +11,11 @@ export const createEvolutionWebhook = async (userEmail: string): Promise => // URL do endpoint - mantém o @ normal no email const endpoint = `/webhook/set/${userEmail}`; - // No body, troca @ por _ no email - const emailWithUnderscore = userEmail.replace('@', '_'); - + // Agora mantemos o email original com @ também na URL do webhook const webhookBody = { webhook: { enabled: true, - url: `https://webhookn8n.innova1001.com.br/webhook/${emailWithUnderscore}`, + url: `https://webhookn8n.innova1001.com.br/webhook/${userEmail}`, webhookByEvents: true, webhookBase64: true, events: [ @@ -29,7 +27,6 @@ export const createEvolutionWebhook = async (userEmail: string): Promise => console.log('Dados do webhook:', { endpoint, emailOriginal: userEmail, - emailComUnderscore: emailWithUnderscore, webhookUrl: webhookBody.webhook.url });