fix: fire init queries in parallel

possible ghost session patch. cc @HUGEIT
This commit is contained in:
Adhiraj Singh
2022-03-22 22:41:23 +05:30
parent 9cacd5173c
commit 3cefad2c8e

View File

@@ -645,12 +645,13 @@ export const makeChatsSocket = (config: SocketConfig) => {
* help ensure parity with WA Web * help ensure parity with WA Web
* */ * */
const fireInitQueries = async() => { const fireInitQueries = async() => {
await fetchAbt() await Promise.all([
await fetchProps() fetchAbt(),
await fetchBlocklist() fetchProps(),
await fetchPrivacySettings() fetchBlocklist(),
fetchPrivacySettings(),
await sendPresenceUpdate('available') sendPresenceUpdate('available')
])
} }
ws.on('CB:presence', handlePresenceUpdate) ws.on('CB:presence', handlePresenceUpdate)