mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: handle undefined in writeJid
This commit is contained in:
@@ -46,8 +46,8 @@ export const encodeBinaryNode = ({ tag, attrs, content }: BinaryNode, buffer: nu
|
||||
const writeJid = ({ agent, device, user, server }: ReturnType<typeof jidDecode>) => {
|
||||
if(typeof agent !== 'undefined' || typeof device !== 'undefined') {
|
||||
pushByte(TAGS.AD_JID)
|
||||
pushByte(agent)
|
||||
pushByte(device)
|
||||
pushByte(agent || 0)
|
||||
pushByte(device || 0)
|
||||
writeString(user)
|
||||
} else {
|
||||
pushByte(TAGS.JID_PAIR)
|
||||
|
||||
Reference in New Issue
Block a user