renamed user.id to user.jid

This commit is contained in:
Adhiraj
2020-08-28 20:22:35 +05:30
parent 890fb726f1
commit 828be7f240
8 changed files with 22 additions and 19 deletions

View File

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