Skip to content

Commit

Permalink
feat: Added client.isOnline function
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed May 30, 2023
1 parent 45450e9 commit c2a9f23
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/api/layers/host.layer.ts
Expand Up @@ -462,6 +462,14 @@ export class HostLayer {
return await evaluateAndReturn(this.page, () => WAPI.isConnected());
}

/**
* Check is online
* @category Host
*/
public async isOnline(): Promise<boolean> {
return await evaluateAndReturn(this.page, () => WPP.conn.isOnline());
}

/**
* Retrieves if the phone is online. Please note that this may not be real time.
* @category Host
Expand Down

0 comments on commit c2a9f23

Please sign in to comment.