chore(): generate docs

This commit is contained in:
WWebJS Bot 2025-12-13 04:56:03 +00:00
commit 376c60668c
76 changed files with 849 additions and 323 deletions

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.2 &raquo; Source: structures/Message.js</title>
<title>whatsapp-web.js 1.34.3 &raquo; Source: structures/Message.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>2</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>34.<wbr>3</a>
</div>
</div>
</nav>
@ -480,7 +480,9 @@ class Message extends Base {
const result &#x3D; await this.client.pupPage.evaluate(async (msgId) &#x3D;&gt; {
const msg &#x3D; window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
if (!msg || !msg.mediaData) {
// REUPLOADING mediaStage means the media is expired and the download button is spinning, cannot be downloaded now
if (!msg || !msg.mediaData || msg.mediaData.mediaStage &#x3D;&#x3D;&#x3D; &#x27;REUPLOADING&#x27;) {
return null;
}
if (msg.mediaData.mediaStage !&#x3D; &#x27;RESOLVED&#x27;) {
@ -497,6 +499,10 @@ class Message extends Base {
}
try {
const mockQpl &#x3D; {
addAnnotations: function() { return this; },
addPoint: function() { return this; }
};
const decryptedMedia &#x3D; await window.Store.DownloadManager.downloadAndMaybeDecrypt({
directPath: msg.directPath,
encFilehash: msg.encFilehash,
@ -504,7 +510,8 @@ class Message extends Base {
mediaKey: msg.mediaKey,
mediaKeyTimestamp: msg.mediaKeyTimestamp,
type: msg.type,
signal: (new AbortController).signal
signal: (new AbortController).signal,
downloadQpl: mockQpl
});
const data &#x3D; await window.WWebJS.arrayBufferToBase64Async(decryptedMedia);
@ -593,7 +600,7 @@ class Message extends Base {
*/
async unpin() {
return await this.client.pupPage.evaluate(async (msgId) &#x3D;&gt; {
return await window.WWebJS.pinUnpinMsgAction(msgId, 2);
return await window.WWebJS.pinUnpinMsgAction(msgId, 2, 0);
}, this.id._serialized);
}
@ -780,6 +787,32 @@ class Message extends Base {
async getPollVotes() {
return await this.client.getPollVotes(this.id._serialized);
}
/**
* Send votes to the poll message
* @param {Array&amp;lt;string&gt;} selectedOptions Array of options selected.
* @returns {Promise}
*/
async vote(selectedOptions) {
if (this.type !&#x3D; MessageTypes.POLL_CREATION) throw &#x27;Invalid usage! Can only be used with a pollCreation message&#x27;;
await this.client.pupPage.evaluate(async (messageId, votes) &#x3D;&gt; {
if (!messageId) return null;
if (!Array.isArray(votes)) votes &#x3D; [votes];
let localIdSet &#x3D; new Set();
const msg &#x3D;
window.Store.Msg.get(messageId) || (await window.Store.Msg.getMessagesById([messageId]))?.messages?.[0];
if (!msg) return null;
msg.pollOptions.forEach(a &#x3D;&gt; {
for (const option of votes) {
if (a.name &#x3D;&#x3D;&#x3D; option) localIdSet.add(a.localId);
}
});
await window.Store.PollsSendVote.sendVote(msg, localIdSet);
}, this.id._serialized, selectedOptions);
}
}
module.exports &#x3D; Message;
@ -793,7 +826,7 @@ module.exports &#x3D; Message;
<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 November 6, 2025.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on December 13, 2025.
</p>
</div>
</footer>