mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
[+] Expose information about the logged in client (#19)
This commit is contained in:
27
src/structures/ClientInfo.js
Normal file
27
src/structures/ClientInfo.js
Normal file
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
|
||||
/**
|
||||
* Current connection information
|
||||
* @extends {Base}
|
||||
*/
|
||||
class ClientInfo extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
this.pushname = data.pushname;
|
||||
this.me = data.me;
|
||||
this.phone = data.phone;
|
||||
this.platform = data.platform;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ClientInfo;
|
||||
Reference in New Issue
Block a user