|
|
|
|
@ -682,7 +682,9 @@ export const handleNotification = (title, _options) => {
|
|
|
|
|
*/
|
|
|
|
|
export const phoneNumberToWAID = (input) => {
|
|
|
|
|
// Remove any non-digit characters except '+'
|
|
|
|
|
const cleanedInput = input.replace(/[^\d+]/g, '');
|
|
|
|
|
const cleanedInput = (input.replace(/[^\d+]/g, ''))
|
|
|
|
|
.replace(/^0+/, '') // Remove leading zeros
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
// Check if the number starts with a valid country code
|
|
|
|
|
const countryCode = cleanedInput.slice(0, 2);
|
|
|
|
|
|