mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: fire init queries in parallel
possible ghost session patch. cc @HUGEIT
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user