chore(v1.34.7): bump version and generate docs
This commit is contained in:
parent
211205363c
commit
f935b50011
1 changed files with 5207 additions and 2669 deletions
61
docs/structures_Contact.js.html
generated
61
docs/structures_Contact.js.html
generated
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.11">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.34.6 » Source: structures/Contact.js</title>
|
||||
<title>whatsapp-web.js 1.34.7 » 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 = 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's countrycode, (1541859685@c.us) => (1)
|
||||
* @returns {Promise&lt;string>}
|
||||
|
|
@ -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&lt;Chat>}
|
||||
*/
|
||||
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&lt;boolean>}
|
||||
*/
|
||||
async block() {
|
||||
if(this.isGroup) return false;
|
||||
if (this.isGroup) return false;
|
||||
|
||||
await this.client.pupPage.evaluate(async (contactId) => {
|
||||
const contact = window.Store.Contact.get(contactId);
|
||||
await window.Store.BlockContact.blockContact({contact});
|
||||
const contact = await window
|
||||
.require('WAWebCollections')
|
||||
.Contact.find(contactId);
|
||||
const resolved = window
|
||||
.require('WAWebBlockContactUtils')
|
||||
.getContactToBlockOnlyUseIfNoAssociatedChat(
|
||||
contact,
|
||||
'ChatListBlock',
|
||||
);
|
||||
await window
|
||||
.require('WAWebBlockContactAction')
|
||||
.blockContact({ contact: resolved });
|
||||
}, this.id._serialized);
|
||||
|
||||
this.isBlocked = true;
|
||||
|
|
@ -199,11 +209,21 @@ class Contact extends Base {
|
|||
* @returns {Promise&lt;boolean>}
|
||||
*/
|
||||
async unblock() {
|
||||
if(this.isGroup) return false;
|
||||
if (this.isGroup) return false;
|
||||
|
||||
await this.client.pupPage.evaluate(async (contactId) => {
|
||||
const contact = window.Store.Contact.get(contactId);
|
||||
await window.Store.BlockContact.unblockContact(contact);
|
||||
const contact = await window
|
||||
.require('WAWebCollections')
|
||||
.Contact.find(contactId);
|
||||
const resolved = window
|
||||
.require('WAWebBlockContactUtils')
|
||||
.getContactToBlockOnlyUseIfNoAssociatedChat(
|
||||
contact,
|
||||
'ChatListBlock',
|
||||
);
|
||||
await window
|
||||
.require('WAWebBlockContactAction')
|
||||
.unblockContact(resolved);
|
||||
}, this.id._serialized);
|
||||
|
||||
this.isBlocked = false;
|
||||
|
|
@ -216,12 +236,13 @@ class Contact extends Base {
|
|||
*/
|
||||
async getAbout() {
|
||||
const about = await this.client.pupPage.evaluate(async (contactId) => {
|
||||
const wid = window.Store.WidFactory.createWid(contactId);
|
||||
return window.Store.StatusUtils.getStatus({'token':'', 'wid': wid});
|
||||
const wid = window.require('WAWebWidFactory').createWid(contactId);
|
||||
return window
|
||||
.require('WAWebContactStatusBridge')
|
||||
.getStatus({ token: '', wid: wid });
|
||||
}, this.id._serialized);
|
||||
|
||||
if (typeof about.status !== 'string')
|
||||
return null;
|
||||
if (typeof about.status !== 'string') return null;
|
||||
|
||||
return about.status;
|
||||
}
|
||||
|
|
@ -237,7 +258,7 @@ class Contact extends Base {
|
|||
/**
|
||||
* Gets the Contact's current status broadcast.
|
||||
* @returns {Promise&lt;Broadcast>}
|
||||
*/
|
||||
*/
|
||||
async getBroadcast() {
|
||||
return await this.client.getBroadcastById(this.id._serialized);
|
||||
}
|
||||
|
|
@ -254,7 +275,7 @@ module.exports = 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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue