feat: force state update (#77)
Whatsapp web will not update state until some action, this will force update client state. First will set state to TIMEOUT, then to current state
This commit is contained in:
parent
05f57d2f39
commit
794c9e16fc
1 changed files with 9 additions and 0 deletions
|
|
@ -430,6 +430,15 @@ class Client extends EventEmitter {
|
||||||
}, chatId);
|
}, chatId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force reset of connection state for the client
|
||||||
|
*/
|
||||||
|
async resetState(){
|
||||||
|
await this.pupPage.evaluate(() => {
|
||||||
|
window.Store.AppState.phoneWatchdog.shiftTimer.forceRunNow();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Client;
|
module.exports = Client;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue