mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 04:29:15 +00:00
feat: block/unblock contacts (#397)
This commit is contained in:
7
index.d.ts
vendored
7
index.d.ts
vendored
@@ -601,6 +601,8 @@ declare namespace WAWebJS {
|
||||
isUser: boolean,
|
||||
/** Indicates if the number is registered on WhatsApp */
|
||||
isWAContact: boolean,
|
||||
/** Indicates if you have blocked this contact */
|
||||
isBlocked: boolean,
|
||||
/** @todo verify labels type. didn't have any documentation */
|
||||
labels?: string[],
|
||||
/** The contact's name, as saved by the current user */
|
||||
@@ -627,6 +629,11 @@ declare namespace WAWebJS {
|
||||
* Will return null when getting chat for currently logged in user.
|
||||
*/
|
||||
getChat: () => Promise<Chat>,
|
||||
|
||||
/** Blocks this contact from WhatsApp */
|
||||
block: () => Promise<boolean>,
|
||||
/** Unlocks this contact from WhatsApp */
|
||||
unblock: () => Promise<boolean>,
|
||||
}
|
||||
|
||||
export interface ContactId {
|
||||
|
||||
Reference in New Issue
Block a user