From 3bf4201ed309f2ebdb67e02abaceb44fdd10ad46 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sun, 1 Oct 2023 14:53:33 +0300 Subject: [PATCH] Update jid-utils.ts --- src/WABinary/jid-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WABinary/jid-utils.ts b/src/WABinary/jid-utils.ts index d7cbbea..87554ca 100644 --- a/src/WABinary/jid-utils.ts +++ b/src/WABinary/jid-utils.ts @@ -30,12 +30,12 @@ export const jidDecode = (jid: string | undefined): FullJid | undefined => { const userCombined = jid!.slice(0, sepIdx) const [userAgent, device] = userCombined.split(':') - const [user, agent] = userAgent.split('_') + const user = userAgent.split('_')[0] return { server, user, - agent: agent ? +agent : undefined, + domainType: server == "lid" ? 1 : 0, device: device ? +device : undefined } }