fix: address removal of Conn.me
This change on WhatsApp Web v2.2045.15 caused errors when sending messages and getting the current user id
This commit is contained in:
parent
b0465ceeff
commit
fc7a1a9974
1 changed files with 749 additions and 738 deletions
|
|
@ -10,7 +10,7 @@ class ClientInfo extends Base {
|
|||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
if (data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
|
|
@ -20,11 +20,17 @@ class ClientInfo extends Base {
|
|||
*/
|
||||
this.pushname = data.pushname;
|
||||
|
||||
/**
|
||||
* @type {object}
|
||||
* @deprecated Use .wid instead
|
||||
*/
|
||||
this.me = data.wid;
|
||||
|
||||
/**
|
||||
* Current user ID
|
||||
* @type {object}
|
||||
*/
|
||||
this.me = data.me;
|
||||
this.wid = data.wid;
|
||||
|
||||
/**
|
||||
* Information about the phone this client is connected to
|
||||
|
|
|
|||
Loading…
Reference in a new issue