mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update 3.Connect.ts
This commit is contained in:
@@ -243,7 +243,11 @@ export class WAConnection extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await delay
|
await delay
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// if an external connect causes the connection to be open
|
||||||
|
if (this.state === 'open') break
|
||||||
|
|
||||||
const shouldUseReconnect = this.lastDisconnectReason !== DisconnectReason.replaced && this.lastDisconnectReason !== DisconnectReason.unknown && this.user
|
const shouldUseReconnect = this.lastDisconnectReason !== DisconnectReason.replaced && this.lastDisconnectReason !== DisconnectReason.unknown && this.user
|
||||||
const reconnectID = shouldUseReconnect ? this.user.jid.replace ('@s.whatsapp.net', '@c.us') : null
|
const reconnectID = shouldUseReconnect ? this.user.jid.replace ('@s.whatsapp.net', '@c.us') : null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user