fix(chats): use abt xmlns and protocol

fix(chats): use abt xmlns and protocol
This commit is contained in:
Renato Alcara
2026-04-25 11:08:47 -03:00
committed by GitHub
parent 104d2c47f5
commit cffaad9e5a
+4 -5
View File
@@ -1060,22 +1060,21 @@ export const makeChatsSocket = (config: SocketConfig) => {
} }
} }
/** sending non-abt props may fix QR scan fail if server expects */ /** fetch AB props */
const fetchProps = async () => { const fetchProps = async () => {
//TODO: implement both protocol 1 and protocol 2 prop fetching, specially for abKey for WM
const resultNode = await query({ const resultNode = await query({
tag: 'iq', tag: 'iq',
attrs: { attrs: {
to: S_WHATSAPP_NET, to: S_WHATSAPP_NET,
xmlns: 'w', xmlns: 'abt',
type: 'get' type: 'get'
}, },
content: [ content: [
{ {
tag: 'props', tag: 'props',
attrs: { attrs: {
protocol: '2', protocol: '1',
hash: authState?.creds?.lastPropHash || '' ...(authState?.creds?.lastPropHash ? { hash: authState.creds.lastPropHash } : {})
} }
} }
] ]