chore(v1.34.7): bump version and generate docs

This commit is contained in:
WWebJS Bot 2026-04-24 20:10:36 +00:00
commit f935b50011

View file

@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.11">
<meta charset="utf-8">
<title>whatsapp-web.js 1.34.6 &raquo; Source: structures/Contact.js</title>
<title>whatsapp-web.js 1.34.7 &raquo; Source: structures/Contact.js</title>
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
@ -15,7 +15,7 @@
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
<div id="jsdoc-navbar-container">
<div id="jsdoc-navbar-content">
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>34.<wbr>6</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>34.<wbr>7</a>
</div>
</div>
</nav>
@ -49,7 +49,7 @@ class Contact extends Base {
constructor(client, data) {
super(client);
if(data) this._patch(data);
if (data) this._patch(data);
}
_patch(data) {
@ -139,7 +139,7 @@ class Contact extends Base {
* @type {boolean}
*/
this.isBlocked &#x3D; data.isBlocked;
return super._patch(data);
}
@ -158,7 +158,7 @@ class Contact extends Base {
async getFormattedNumber() {
return await this.client.getFormattedNumber(this.id._serialized);
}
/**
* Returns the contact&#x27;s countrycode, (1541859685@c.us) &#x3D;&gt; (1)
* @returns {Promise&amp;lt;string&gt;}
@ -166,14 +166,14 @@ class Contact extends Base {
async getCountryCode() {
return await this.client.getCountryCode(this.id._serialized);
}
/**
* Returns the Chat that corresponds to this Contact.
* Returns the Chat that corresponds to this Contact.
* Will return null when getting chat for currently logged in user.
* @returns {Promise&amp;lt;Chat&gt;}
*/
async getChat() {
if(this.isMe) return null;
if (this.isMe) return null;
return await this.client.getChatById(this.id._serialized);
}
@ -183,11 +183,21 @@ class Contact extends Base {
* @returns {Promise&amp;lt;boolean&gt;}
*/
async block() {
if(this.isGroup) return false;
if (this.isGroup) return false;
await this.client.pupPage.evaluate(async (contactId) &#x3D;&gt; {
const contact &#x3D; window.Store.Contact.get(contactId);
await window.Store.BlockContact.blockContact({contact});
const contact &#x3D; await window
.require(&#x27;WAWebCollections&#x27;)
.Contact.find(contactId);
const resolved &#x3D; window
.require(&#x27;WAWebBlockContactUtils&#x27;)
.getContactToBlockOnlyUseIfNoAssociatedChat(
contact,
&#x27;ChatListBlock&#x27;,
);
await window
.require(&#x27;WAWebBlockContactAction&#x27;)
.blockContact({ contact: resolved });
}, this.id._serialized);
this.isBlocked &#x3D; true;
@ -199,11 +209,21 @@ class Contact extends Base {
* @returns {Promise&amp;lt;boolean&gt;}
*/
async unblock() {
if(this.isGroup) return false;
if (this.isGroup) return false;
await this.client.pupPage.evaluate(async (contactId) &#x3D;&gt; {
const contact &#x3D; window.Store.Contact.get(contactId);
await window.Store.BlockContact.unblockContact(contact);
const contact &#x3D; await window
.require(&#x27;WAWebCollections&#x27;)
.Contact.find(contactId);
const resolved &#x3D; window
.require(&#x27;WAWebBlockContactUtils&#x27;)
.getContactToBlockOnlyUseIfNoAssociatedChat(
contact,
&#x27;ChatListBlock&#x27;,
);
await window
.require(&#x27;WAWebBlockContactAction&#x27;)
.unblockContact(resolved);
}, this.id._serialized);
this.isBlocked &#x3D; false;
@ -216,12 +236,13 @@ class Contact extends Base {
*/
async getAbout() {
const about &#x3D; await this.client.pupPage.evaluate(async (contactId) &#x3D;&gt; {
const wid &#x3D; window.Store.WidFactory.createWid(contactId);
return window.Store.StatusUtils.getStatus({&#x27;token&#x27;:&#x27;&#x27;, &#x27;wid&#x27;: wid});
const wid &#x3D; window.require(&#x27;WAWebWidFactory&#x27;).createWid(contactId);
return window
.require(&#x27;WAWebContactStatusBridge&#x27;)
.getStatus({ token: &#x27;&#x27;, wid: wid });
}, this.id._serialized);
if (typeof about.status !&#x3D;&#x3D; &#x27;string&#x27;)
return null;
if (typeof about.status !&#x3D;&#x3D; &#x27;string&#x27;) return null;
return about.status;
}
@ -237,7 +258,7 @@ class Contact extends Base {
/**
* Gets the Contact&#x27;s current status broadcast.
* @returns {Promise&amp;lt;Broadcast&gt;}
*/
*/
async getBroadcast() {
return await this.client.getBroadcastById(this.id._serialized);
}
@ -254,7 +275,7 @@ module.exports &#x3D; Contact;
<footer id="jsdoc-footer" class="jsdoc-footer">
<div id="jsdoc-footer-container">
<p>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on January 30, 2026.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on April 24, 2026.
</p>
</div>
</footer>