chore(): generate docs
This commit is contained in:
parent
5ad6a03b2c
commit
f41d1e2174
73 changed files with 684 additions and 291 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.11">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.28.0 » Source: structures/Message.js</title>
|
||||
<title>whatsapp-web.js 1.28.1-alpha.0 » 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>28.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>28.<wbr>1-alpha.<wbr>0</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -529,23 +529,26 @@ class Message extends Base {
|
|||
/**
|
||||
* Deletes a message from the chat
|
||||
* @param {?boolean} everyone If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat.
|
||||
* @param {?boolean} [clearMedia = true] If true, any associated media will also be deleted from a device.
|
||||
*/
|
||||
async delete(everyone) {
|
||||
await this.client.pupPage.evaluate(async (msgId, everyone) => {
|
||||
async delete(everyone, clearMedia = true) {
|
||||
await this.client.pupPage.evaluate(async (msgId, everyone, clearMedia) => {
|
||||
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
|
||||
let chat = await window.Store.Chat.find(msg.id.remote);
|
||||
const chat = window.Store.Chat.get(msg.id.remote) || (await window.Store.Chat.find(msg.id.remote));
|
||||
|
||||
const canRevoke = window.Store.MsgActionChecks.canSenderRevokeMsg(msg) || window.Store.MsgActionChecks.canAdminRevokeMsg(msg);
|
||||
const canRevoke =
|
||||
window.Store.MsgActionChecks.canSenderRevokeMsg(msg) || window.Store.MsgActionChecks.canAdminRevokeMsg(msg);
|
||||
|
||||
if (everyone &amp;&amp; canRevoke) {
|
||||
if (window.compareWwebVersions(window.Debug.VERSION, '>=', '2.3000.0')) {
|
||||
return window.Store.Cmd.sendRevokeMsgs(chat, { list: [msg], type: 'message' }, { clearMedia: true });
|
||||
} else {
|
||||
return window.Store.Cmd.sendRevokeMsgs(chat, [msg], { clearMedia: true, type: msg.id.fromMe ? 'Sender' : 'Admin' });
|
||||
}
|
||||
return window.compareWwebVersions(window.Debug.VERSION, '>=', '2.3000.0')
|
||||
? window.Store.Cmd.sendRevokeMsgs(chat, { list: [msg], type: 'message' }, { clearMedia: clearMedia })
|
||||
: window.Store.Cmd.sendRevokeMsgs(chat, [msg], { clearMedia: true, type: msg.id.fromMe ? 'Sender' : 'Admin' });
|
||||
}
|
||||
|
||||
return window.Store.Cmd.sendDeleteMsgs(chat, [msg], true);
|
||||
}, this.id._serialized, everyone);
|
||||
return window.compareWwebVersions(window.Debug.VERSION, '>=', '2.3000.0')
|
||||
? window.Store.Cmd.sendDeleteMsgs(chat, { list: [msg], type: 'message' }, clearMedia)
|
||||
: window.Store.Cmd.sendDeleteMsgs(chat, [msg], clearMedia);
|
||||
}, this.id._serialized, everyone, clearMedia);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -750,7 +753,7 @@ module.exports = 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 May 12, 2025.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on May 30, 2025.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Reference in a new issue