diff --git a/index.d.ts b/index.d.ts index 07e9527..9bb7870 100644 --- a/index.d.ts +++ b/index.d.ts @@ -242,7 +242,7 @@ declare namespace WAWebJS { syncHistory(chatId: string): Promise /** Save new contact to user's addressbook or edit the existing one */ - saveOrEditAddressbookContact(phoneNumber: string, firstName: string, lastName: string, syncToAddressbook?: boolean): Promise + saveOrEditAddressbookContact(phoneNumber: string, firstName: string, lastName: string, syncToAddressbook?: boolean): Promise /** * Add or edit a customer note diff --git a/src/Client.js b/src/Client.js index d38b5be..a2437d1 100644 --- a/src/Client.js +++ b/src/Client.js @@ -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} Object in a wid format + * @returns {Promise} */ 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,