diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index 7318d77..709f223 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -639,15 +639,14 @@ export const makeChatsSocket = (config: SocketConfig) => { * queries need to be fired on connection open * help ensure parity with WA Web * */ - const fireInitQueries = () => ( - Promise.all([ - fetchAbt(), - fetchProps(), - fetchBlocklist(), - fetchPrivacySettings(), - sendPresenceUpdate('available') - ]) - ) + const fireInitQueries = async() => { + await fetchAbt() + await fetchProps() + await fetchBlocklist() + await fetchPrivacySettings() + + await sendPresenceUpdate('available') + } ws.on('CB:presence', handlePresenceUpdate) ws.on('CB:chatstate', handlePresenceUpdate) diff --git a/src/Socket/socket.ts b/src/Socket/socket.ts index 6f3ba60..ba60c54 100644 --- a/src/Socket/socket.ts +++ b/src/Socket/socket.ts @@ -384,13 +384,12 @@ export const makeSocket = ({ ) /** i have no idea why this exists. pls enlighten me */ const sendPassiveIq = (tag: 'passive' | 'active') => ( - sendNode({ + query({ tag: 'iq', attrs: { to: S_WHATSAPP_NET, xmlns: 'passive', type: 'set', - id: generateMessageTag(), }, content: [ { tag, attrs: { } }