Update 3.Connect.ts

This commit is contained in:
Adhiraj
2020-08-25 22:16:45 +05:30
parent 64a360a8a7
commit 07076fd227

View File

@@ -263,7 +263,7 @@ export class WAConnection extends Base {
await delay
try {
const reconnectID = this.lastDisconnectReason !== 'replaced' && this.user ? this.user.id.replace ('@s.whatsapp.net', '@c.us') : null
const reconnectID = this.lastDisconnectReason !== 'replaced' && this.lastDisconnectReason !== 'unknown' && this.user ? this.user.id.replace ('@s.whatsapp.net', '@c.us') : null
await this.connect ({ timeoutMs: 30000, retryOnNetworkErrors: true, reconnectID })
this.cancelReconnect = null
break