[+] 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
parent 88c56b1371
commit ba8edc8d40
4 changed files with 46 additions and 3 deletions

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;