From 422c6f651eebee0f8243ef47ef97f1acf5b67b25 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 10 May 2024 11:44:11 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20WhatsApp=E5=8F=B7=E7=A0=81=E5=A4=84?= =?UTF-8?q?=E7=90=86:=20=E5=8F=96=E6=B6=88=E5=A2=A8=E8=A5=BF=E5=93=A5?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/channel/whatsappUtils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/channel/whatsappUtils.js b/src/channel/whatsappUtils.js index b450602..4ed653e 100644 --- a/src/channel/whatsappUtils.js +++ b/src/channel/whatsappUtils.js @@ -693,7 +693,8 @@ export const phoneNumberToWAID = (input) => { const isArgentina = countryCode === '54'; const isMexico = countryCode === '52'; - if (!isArgentina && !isMexico) { + // if (!isArgentina && !isMexico) { + if (!isArgentina) { return cleanedInput; // Return the cleaned input as is } @@ -711,9 +712,9 @@ export const phoneNumberToWAID = (input) => { formattedNumber = `54 9 ${formattedNumber.slice(2)}`; } else if (isMexico) { // Remove leading '0' after country code - formattedNumber = formattedNumber.replace(/^52 ?0/, '52'); + // formattedNumber = formattedNumber.replace(/^52 ?0/, '52'); // Insert "1" after the country code - formattedNumber = `52 1 ${formattedNumber.slice(2)}`; + // formattedNumber = `52 1 ${formattedNumber.slice(2)}`; } // Remove any non-digit characters