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
|
||||
* */
|
||||
const fireInitQueries = async() => {
|
||||
await fetchAbt()
|
||||
await fetchProps()
|
||||
await fetchBlocklist()
|
||||
await fetchPrivacySettings()
|
||||
|
||||
await sendPresenceUpdate('available')
|
||||
await Promise.all([
|
||||
fetchAbt(),
|
||||
fetchProps(),
|
||||
fetchBlocklist(),
|
||||
fetchPrivacySettings(),
|
||||
sendPresenceUpdate('available')
|
||||
])
|
||||
}
|
||||
|
||||
ws.on('CB:presence', handlePresenceUpdate)
|
||||
|
||||
Reference in New Issue
Block a user