parent
b0baeaa8da
commit
300b367fa0
1 changed files with 12 additions and 0 deletions
|
|
@ -359,6 +359,15 @@ class Client extends EventEmitter {
|
|||
await this.pupBrowser.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out the client, closing the current session
|
||||
*/
|
||||
async logout() {
|
||||
return await this.pupPage.evaluate(() => {
|
||||
return window.Store.AppState.logout();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of WhatsApp Web currently being run
|
||||
* @returns Promise<string>
|
||||
|
|
|
|||
Loading…
Reference in a new issue