mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-21 04:59:14 +00:00
@@ -507,6 +507,17 @@ class Client extends EventEmitter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a given ID is registered in whatsapp
|
||||||
|
* @returns {Promise<Boolean>}
|
||||||
|
*/
|
||||||
|
async isRegisteredUser(id) {
|
||||||
|
return await this.pupPage.evaluate(async (id) => {
|
||||||
|
let result = await window.Store.Wap.queryExist(id);
|
||||||
|
return result.jid !== undefined;
|
||||||
|
}, id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Client;
|
module.exports = Client;
|
||||||
|
|||||||
Reference in New Issue
Block a user