Spaces:
Paused
Paused
File size: 354 Bytes
464b662 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | export function formatJid(target: string): string {
if (target.includes('@g.us') || target.includes('@s.whatsapp.net')) {
return target;
}
const cleanTarget = target.replace(/\D/g, '');
let processed = cleanTarget;
if (processed.startsWith('0')) {
processed = '62' + processed.slice(1);
}
return processed + '@s.whatsapp.net';
}
|