Fix method saveOrEditAddressbookContact (#3923)
* Fix method saveOrEditAddressbookContact * Update saveOrEditAddressbookContact return void * Update saveOrEditAddressbookContact return void
This commit is contained in:
parent
b3caffa796
commit
6876dd236b
2 changed files with 4 additions and 2 deletions
2
index.d.ts
vendored
2
index.d.ts
vendored
|
|
@ -242,7 +242,7 @@ declare namespace WAWebJS {
|
|||
syncHistory(chatId: string): Promise<boolean>
|
||||
|
||||
/** Save new contact to user's addressbook or edit the existing one */
|
||||
saveOrEditAddressbookContact(phoneNumber: string, firstName: string, lastName: string, syncToAddressbook?: boolean): Promise<ChatId>
|
||||
saveOrEditAddressbookContact(phoneNumber: string, firstName: string, lastName: string, syncToAddressbook?: boolean): Promise<void>
|
||||
|
||||
/**
|
||||
* Add or edit a customer note
|
||||
|
|
|
|||
|
|
@ -2317,13 +2317,15 @@ class Client extends EventEmitter {
|
|||
* @param {string} firstName
|
||||
* @param {string} lastName
|
||||
* @param {boolean} [syncToAddressbook = false] If set to true, the contact will also be saved to the user's address book on their phone. False by default
|
||||
* @returns {Promise<import('..').ChatId>} Object in a wid format
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async saveOrEditAddressbookContact(phoneNumber, firstName, lastName, syncToAddressbook = false)
|
||||
{
|
||||
return await this.pupPage.evaluate(async (phoneNumber, firstName, lastName, syncToAddressbook) => {
|
||||
return await window.Store.AddressbookContactUtils.saveContactAction(
|
||||
phoneNumber,
|
||||
phoneNumber,
|
||||
null,
|
||||
null,
|
||||
firstName,
|
||||
lastName,
|
||||
|
|
|
|||
Loading…
Reference in a new issue