[+] Expose information about the logged in client (#19)

This commit is contained in:
Pedro S. Lopez 2020-02-01 21:16:03 -04:00 • committed by GitHub
commit ba8edc8d40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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;