mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 04:29:15 +00:00
feat: Get registered ID for a given phone number (#483)
Exposes internal getNumberById function for easy usage. This can help with dealing with brazilian numbers with the extra digit, always returning the correct ID. This will probably eventually replace the current isRegisteredUser function. Co-authored-by: Pedro Lopez <pedroslopez@me.com>
This commit is contained in:
committed by
Pedro S. Lopez
parent
87cb5a0519
commit
576768e390
3
index.d.ts
vendored
3
index.d.ts
vendored
@@ -77,6 +77,9 @@ declare namespace WAWebJS {
|
||||
/** Check if a given ID is registered in whatsapp */
|
||||
isRegisteredUser(contactId: string): Promise<boolean>
|
||||
|
||||
/** Get the registered WhatsApp ID for a number. Returns null if the number is not registered on WhatsApp. */
|
||||
getNumberId(number: string): Promise<ContactId?>
|
||||
|
||||
/**
|
||||
* Mutes the Chat until a specified date
|
||||
* @param chatId ID of the chat that will be muted
|
||||
|
||||
Reference in New Issue
Block a user