feat: Set client's display name (pushname)
This commit is contained in:
parent
97705b1865
commit
9da553ecb9
1 changed files with 17 additions and 0 deletions
|
|
@ -556,6 +556,17 @@ class Client extends EventEmitter {
|
|||
}, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current user's display name.
|
||||
* This is the name shown to WhatsApp users that have not added you as a contact beside your number in groups and in your profile.
|
||||
* @param {string} displayName New display name
|
||||
*/
|
||||
async setDisplayName(displayName) {
|
||||
await this.pupPage.evaluate(async displayName => {
|
||||
return await window.Store.Wap.setPushname(displayName);
|
||||
}, displayName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current connection state for the client
|
||||
* @returns {WAState}
|
||||
|
|
|
|||
Loading…
Reference in a new issue