From 838905f3dde77b8449cfe0d27660f60ba9d9562b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yves=20Cl=C3=AAuder=20Lima=20de=20Jesus?= Date: Sat, 27 Jan 2024 22:37:58 -0300 Subject: [PATCH] fix: position splice --- src/whatsapp/services/chatwoot.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsapp/services/chatwoot.service.ts b/src/whatsapp/services/chatwoot.service.ts index c78d2bb1..e4754cd8 100644 --- a/src/whatsapp/services/chatwoot.service.ts +++ b/src/whatsapp/services/chatwoot.service.ts @@ -398,7 +398,7 @@ export class ChatwootService { if (!contact && !isGroup && query.startsWith('+55') && query.length > 13) { this.logger.verbose('trying without the 9th digit'); - query = query.slice(0, 3) + query.slice(4); + query = query.slice(0, 5) + query.slice(6); contact = await client.contacts.search({ accountId: this.provider.account_id, q: query,