added experimental always use takeover

This commit is contained in:
Adhiraj Singh
2020-10-13 14:49:36 +05:30
parent 163497964c
commit 16b138c759
3 changed files with 5 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ export class WAConnection extends Base {
// determine whether reconnect should be used or not
const shouldUseReconnect = (this.lastDisconnectReason === DisconnectReason.close ||
this.lastDisconnectReason === DisconnectReason.lost) &&
this.user?.jid
!this.connectOptions.alwaysUseTakeover
const reconnectID = shouldUseReconnect && this.user.jid.replace ('@s.whatsapp.net', '@c.us')
this.conn = new WS(WS_URL, null, {