void / utils /helpers.js
github-actions[bot]
Automated sync from GitHub
ca52557
Raw History Blame Contribute Delete
288 Bytes
export function normalizeJid(jid) {
return jid.replace(/@lid$/, '@s.whatsapp.net')
}
export function getUserNumber(jid) {
const cleanJid = normalizeJid(jid)
return cleanJid.split('@')[0]
}
export function isGroupJid(jid) {
return jid.endsWith('@g.us') || jid.endsWith('@lid')
}