fix: emit disconnected event on page navigation
This also addresses an issue due to a change in behavior from WhatsApp Web when the session is logged out from the device.
This commit is contained in:
parent
f1e2f32988
commit
6cece4a006
3 changed files with 14 additions and 3 deletions
|
|
@ -259,6 +259,10 @@ client.on('change_battery', (batteryInfo) => {
|
|||
console.log(`Battery: ${battery}% - Charging? ${plugged}`);
|
||||
});
|
||||
|
||||
client.on('change_state', state => {
|
||||
console.log('CHANGE STATE', state );
|
||||
});
|
||||
|
||||
client.on('disconnected', (reason) => {
|
||||
console.log('Client was logged out', reason);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue