Compare commits

...

20 Commits

Author SHA1 Message Date
Pedro Lopez
2894832b00 chore: mark version v1.12.6 2021-04-20 22:59:35 -04:00
Pedro Lopez
6cece4a006 fix: emit disconnected event on page navigation
This also addresses an issue due to a change in behavior from WhatsApp Web when the session is logged out from the device.
2021-04-20 20:02:22 -04:00
Pedro Lopez
f1e2f32988 fix: click correct element on manual qr code refresh 2021-04-20 19:39:13 -04:00
Pedro S. Lopez
f564e41781 chore: bump version to v1.12.5 2021-02-25 00:31:39 -04:00
Jacob Galam
e6015162c5 fix(types): media type in MessageSendOptions (#554)
Co-authored-by: Pedro S. Lopez <pslamoros@hotmail.com>
2021-02-25 00:27:23 -04:00
Pedro S. Lopez
bc90ffcb19 fix: WhatsApp Web v2.2106.5 compatibility 2021-02-25 00:23:49 -04:00
Antoine Schaller
2702757dce fix: star() & unstar() functions (#547) 2021-02-15 22:24:07 -04:00
Pedro S. Lopez
56171f957e chore: don't auto set bug label on issues
This should be manually added when it's confirmed a bug
2021-02-13 11:29:16 -04:00
Pedro S. Lopez
204a1c79af chore: mark version v1.12.4 2021-02-11 18:44:15 -04:00
Pedro S. Lopez
168c84250e fix sending stickers on WhatsApp Web v2.2104.6 2021-02-11 18:40:35 -04:00
Pedro S. Lopez
d96e8e5eb5 chore: mark version v1.12.3 2021-02-09 15:40:57 -04:00
Pedro S. Lopez
0cbb0373ad fix(ts): getNumberId typings caused error on build 2021-02-09 15:35:57 -04:00
Pedro S. Lopez
1f756142e4 ignore logs on npm publish 2021-02-09 00:48:58 -04:00
Pedro S. Lopez
4047afe332 chore: mark version v1.12.2 2021-02-09 00:47:28 -04:00
Pedro S. Lopez
89029ac916 add docs 2021-02-09 00:43:45 -04:00
Artem Sinelnikov
fa4923db98 fixed acceptInvite typings 2021-02-09 00:43:45 -04:00
Pedro S. Lopez
559133c3c4 fix: upload media on WhatsApp Web v2.2104.6 2021-02-09 00:35:25 -04:00
Pedro S. Lopez
e2acd03efc fix: download media on WhatsApp Web v2.2104.6 2021-02-09 00:24:48 -04:00
Pedro S. Lopez
c6974295a6 chore: mark version v1.12.1 2021-01-30 20:38:10 -04:00
Pedro S. Lopez
6590c75c8a fix (ts): include pupPage and pupBrowser properties on Client typedef 2021-01-30 20:36:46 -04:00
44 changed files with 204 additions and 186 deletions

View File

@@ -2,7 +2,6 @@
name: Bug report
about: Is something not working as intended? Report it here.
title: ''
labels: bug
assignees: ''
---

View File

@@ -5,4 +5,10 @@ docs/*
.jsdoc.json
.editorconfig
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*session.json

View File

@@ -1,4 +1,4 @@
[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2049.10](https://img.shields.io/badge/WhatsApp_Web-2.2049.10-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4)
[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2106.5](https://img.shields.io/badge/WhatsApp_Web-2.2106.5-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4)
# whatsapp-web.js
A WhatsApp API client that connects through the WhatsApp Web browser app

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Base</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Base</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -50,7 +50,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: BusinessContact</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: BusinessContact</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -290,7 +290,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Chat</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Chat</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -224,8 +224,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing Boolean</code> 
<p>result</p>
<p><code>Promise containing Boolean</code> <p>result</p>
</p>
</dd>
</dl>
@@ -240,8 +239,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing Boolean</code> 
<p>result</p>
<p><code>Promise containing Boolean</code> <p>result</p>
</p>
</dd>
</dl>
@@ -374,8 +372,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>New pin state. Could be false if the max number of pinned chats was reached.</p>
<p><code>Promise containing boolean</code> <p>New pin state. Could be false if the max number of pinned chats was reached.</p>
</p>
</dd>
</dl>
@@ -426,8 +423,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing <a href="Message.html">Message</a></code> 
<p>Message that was just sent</p>
<p><code>Promise containing <a href="Message.html">Message</a></code> <p>Message that was just sent</p>
</p>
</dd>
</dl>
@@ -437,8 +433,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing Boolean</code> 
<p>result</p>
<p><code>Promise containing Boolean</code> <p>result</p>
</p>
</dd>
</dl>
@@ -468,8 +463,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>New pin state</p>
<p><code>Promise containing boolean</code> <p>New pin state</p>
</p>
</dd>
</dl>
@@ -483,7 +477,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Client</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Client</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -499,7 +499,7 @@
<h2>Methods</h2>
<section>
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
<h3 id="acceptInvite"><span class="symbol-name">acceptInvite</span><span class="signature"><span class="signature-params">(inviteCode)</span></span></h3>
<h3 id="acceptInvite"><span class="symbol-name">acceptInvite</span><span class="signature"><span class="signature-params">(inviteCode)</span>&nbsp;&rarr; <span class="signature-returns"> Promise containing string</span></span></h3>
<p>Accepts an invitation to join a group</p>
<section>
<h4>Parameter</h4>
@@ -531,6 +531,11 @@
</table>
</section>
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing string</code> <p>Id of the joined Chat</p>
</p>
</dd>
</dl>
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
<h3 id="archiveChat"><span class="symbol-name">archiveChat</span><span class="signature"><span class="signature-params">()</span>&nbsp;&rarr; <span class="signature-returns"> boolean</span></span></h3>
@@ -590,18 +595,15 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Object</code> 
<p>createRes</p>
<p><code>Object</code> <p>createRes</p>
</p>
</dd>
<dd>
<p><code>string</code> 
<p>createRes.gid - ID for the group that was just created</p>
<p><code>string</code> <p>createRes.gid - ID for the group that was just created</p>
</p>
</dd>
<dd>
<p><code>Object with string properties</code> 
<p>createRes.missingParticipants - participants that were not added to the group. Keys represent the ID for participant that was not added and its value is a status code that represents the reason why participant could not be added. This is usually 403 if the user's privacy settings don't allow you to add them to groups.</p>
<p><code>Object with string properties</code> <p>createRes.missingParticipants - participants that were not added to the group. Keys represent the ID for participant that was not added and its value is a status code that represents the reason why participant could not be added. This is usually 403 if the user's privacy settings don't allow you to add them to groups.</p>
</p>
</dd>
</dl>
@@ -810,8 +812,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing object</code> 
<p>Invite information</p>
<p><code>Promise containing object</code> <p>Invite information</p>
</p>
</dd>
</dl>
@@ -1092,8 +1093,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>New pin state. Could be false if the max number of pinned chats was reached.</p>
<p><code>Promise containing boolean</code> <p>New pin state. Could be false if the max number of pinned chats was reached.</p>
</p>
</dd>
</dl>
@@ -1163,8 +1163,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing <a href="Message.html">Message</a></code> 
<p>Message that was just sent</p>
<p><code>Promise containing <a href="Message.html">Message</a></code> <p>Message that was just sent</p>
</p>
</dd>
</dl>
@@ -1207,8 +1206,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>result</p>
<p><code>Promise containing boolean</code> <p>result</p>
</p>
</dd>
</dl>
@@ -1330,8 +1328,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>New pin state</p>
<p><code>Promise containing boolean</code> <p>New pin state</p>
</p>
</dd>
</dl>
@@ -1593,13 +1590,13 @@
<p>reason</p>
</td>
<td>
<p><a href="global.html#WAState">WAState</a></p>
<p>(<a href="global.html#WAState">WAState</a> or "NAVIGATION")</p>
</td>
<td>
<p>&nbsp;</p>
</td>
<td>
<p>state that caused the disconnect</p>
<p>reason that caused the disconnect</p>
</td>
</tr>
</tbody>
@@ -1981,7 +1978,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: Client.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: Client.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -147,18 +147,18 @@ class Client extends EventEmitter {
} else {
const getQrCode &#x3D; async () &#x3D;&gt; {
// Check if retry button is present
var QR_RETRY_SELECTOR &#x3D; &#x27;div[data-ref] &gt; span &gt; div&#x27;;
var QR_RETRY_SELECTOR &#x3D; &#x27;div[data-ref] &gt; span &gt; button&#x27;;
var qrRetry &#x3D; await page.$(QR_RETRY_SELECTOR);
if (qrRetry) {
await qrRetry.click();
}
// Wait for QR Code
const QR_CANVAS_SELECTOR &#x3D; &#x27;canvas&#x27;;
await page.waitForSelector(QR_CANVAS_SELECTOR, { timeout: this.options.qrTimeoutMs });
const qrImgData &#x3D; await page.$eval(QR_CANVAS_SELECTOR, canvas &#x3D;&gt; [].slice.call(canvas.getContext(&#x27;2d&#x27;).getImageData(0, 0, 264, 264).data));
const qr &#x3D; jsQR(qrImgData, 264, 264).data;
/**
* Emitted when the QR code is received
* @event Client#qr
@@ -366,7 +366,7 @@ class Client extends EventEmitter {
/**
* Emitted when the client has been disconnected
* @event Client#disconnected
* @param {WAState} reason state that caused the disconnect
* @param {WAState|&quot;NAVIGATION&quot;} reason reason that caused the disconnect
*/
this.emit(Events.DISCONNECTED, state);
this.destroy();
@@ -404,6 +404,13 @@ class Client extends EventEmitter {
* @event Client#ready
*/
this.emit(Events.READY);
// Disconnect when navigating away
// Because WhatsApp Web now reloads when logging out from the device, this also covers that case
this.pupPage.on(&#x27;framenavigated&#x27;, async () &#x3D;&gt; {
this.emit(Events.DISCONNECTED, &#x27;NAVIGATION&#x27;);
await this.destroy();
});
}
/**
@@ -461,7 +468,7 @@ class Client extends EventEmitter {
* @property {string} [quotedMessageId] - Id of the message that is being quoted (or replied to)
* @property {Contact[]} [mentions] - Contacts that are being mentioned in the message
* @property {boolean} [sendSeen&#x3D;true] - Mark the conversation as seen after sending the message
* @property {boolean} [media] - Media to be sent
* @property {MessageMedia} [media] - Media to be sent
*/
/**
@@ -587,6 +594,7 @@ class Client extends EventEmitter {
/**
* Accepts an invitation to join a group
* @param {string} inviteCode Invitation code
* @returns {Promise&amp;lt;string&gt;} Id of the joined Chat
*/
async acceptInvite(inviteCode) {
const chatId &#x3D; await this.pupPage.evaluate(async inviteCode &#x3D;&gt; {
@@ -892,7 +900,7 @@ module.exports &#x3D; Client;
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: ClientInfo</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: ClientInfo</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -213,18 +213,15 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>object</code> 
<p>batteryStatus</p>
<p><code>object</code> <p>batteryStatus</p>
</p>
</dd>
<dd>
<p><code>number</code> 
<p>batteryStatus.battery - The current battery percentage</p>
<p><code>number</code> <p>batteryStatus.battery - The current battery percentage</p>
</p>
</dd>
<dd>
<p><code>boolean</code> 
<p>batteryStatus.plugged - Indicates if the phone is plugged in (true) or not (false)</p>
<p><code>boolean</code> <p>batteryStatus.plugged - Indicates if the phone is plugged in (true) or not (false)</p>
</p>
</dd>
</dl>
@@ -238,7 +235,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Contact</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Contact</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -257,7 +257,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: GroupChat</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: GroupChat</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -405,8 +405,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing {status: number}</code> 
<p>Object with status code indicating if the operation was successful</p>
<p><code>Promise containing {status: number}</code> <p>Object with status code indicating if the operation was successful</p>
</p>
</dd>
</dl>
@@ -491,8 +490,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing string</code> 
<p>Group's invite code</p>
<p><code>Promise containing string</code> <p>Group's invite code</p>
</p>
</dd>
</dl>
@@ -602,8 +600,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing {status: number}</code> 
<p>Object with status code indicating if the operation was successful</p>
<p><code>Promise containing {status: number}</code> <p>Object with status code indicating if the operation was successful</p>
</p>
</dd>
</dl>
@@ -803,8 +800,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
<p><code>Promise containing boolean</code> <p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
</p>
</dd>
</dl>
@@ -844,8 +840,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing boolean</code> 
<p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
<p><code>Promise containing boolean</code> <p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
</p>
</dd>
</dl>
@@ -921,7 +916,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: GroupNotification</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: GroupNotification</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -233,7 +233,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: InterfaceController</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: InterfaceController</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -263,7 +263,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Label</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Label</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -163,7 +163,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Location</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Location</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -149,7 +149,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Message</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Message</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -487,7 +487,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: MessageMedia</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: MessageMedia</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -208,7 +208,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: PrivateChat</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: PrivateChat</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -519,7 +519,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: PrivateContact</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: PrivateContact</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -283,7 +283,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Class: Util</title>
<title>whatsapp-web.js 1.12.6 &raquo; Class: Util</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -104,8 +104,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> 
<p>media in webp format</p>
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> <p>media in webp format</p>
</p>
</dd>
</dl>
@@ -143,8 +142,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> 
<p>media in webp format</p>
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> <p>media in webp format</p>
</p>
</dd>
</dl>
@@ -182,8 +180,7 @@
<dl class="dl-compact">
<dt>Returns</dt>
<dd>
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> 
<p>media in webp format</p>
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> <p>media in webp format</p>
</p>
</dd>
</dl>
@@ -230,7 +227,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Globals</title>
<title>whatsapp-web.js 1.12.6 &raquo; Globals</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -1411,7 +1411,7 @@
<p>media</p>
</td>
<td>
<p>boolean</p>
<p><a href="MessageMedia.html">MessageMedia</a></p>
</td>
<td>
<p>Yes</p>
@@ -1435,7 +1435,7 @@
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Home</title>
<title>whatsapp-web.js 1.12.6 &raquo; Home</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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -27,11 +27,11 @@
<div id="jsdoc-main" role="main">
<header class="page-header">
<h1>
whatsapp-web.js 1.12.0
whatsapp-web.js 1.12.6
</h1>
</header>
<article>
<p><a href="https://www.npmjs.com/package/whatsapp-web.js"><img src="https://img.shields.io/npm/v/whatsapp-web.js.svg" alt="npm"></a> <a href="https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765"><img src="https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg" alt="Depfu"></a> <img src="https://img.shields.io/badge/WhatsApp_Web-2.2049.10-brightgreen.svg" alt="WhatsApp_Web 2.2049.10"> <a href="https://discord.gg/H7DqQs4"><img src="https://img.shields.io/discord/698610475432411196.svg?logo=discord" alt="Discord Chat"></a></p>
<p><a href="https://www.npmjs.com/package/whatsapp-web.js"><img src="https://img.shields.io/npm/v/whatsapp-web.js.svg" alt="npm"></a> <a href="https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765"><img src="https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg" alt="Depfu"></a> <img src="https://img.shields.io/badge/WhatsApp_Web-2.2106.5-brightgreen.svg" alt="WhatsApp_Web 2.2106.5"> <a href="https://discord.gg/H7DqQs4"><img src="https://img.shields.io/discord/698610475432411196.svg?logo=discord" alt="Discord Chat"></a></p>
<h1>whatsapp-web.js</h1>
<p>A WhatsApp API client that connects through the WhatsApp Web browser app</p>
<p>It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.</p>
@@ -2366,7 +2366,7 @@ client.initialize();
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/Base.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/Base.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -60,7 +60,7 @@ module.exports &#x3D; Base;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/BusinessContact.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/BusinessContact.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -59,7 +59,7 @@ module.exports &#x3D; BusinessContact;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/Chat.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/Chat.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -288,7 +288,7 @@ module.exports &#x3D; Chat;
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/ClientInfo.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/ClientInfo.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -108,7 +108,7 @@ module.exports &#x3D; ClientInfo;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/Contact.js</title>
<title>whatsapp-web.js 1.12.6 &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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -219,7 +219,7 @@ module.exports &#x3D; Contact;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/GroupChat.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/GroupChat.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -239,7 +239,7 @@ module.exports &#x3D; GroupChat;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/GroupNotification.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/GroupNotification.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -143,7 +143,7 @@ module.exports &#x3D; GroupNotification;
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/Label.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/Label.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -88,7 +88,7 @@ module.exports &#x3D; Label;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/Location.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/Location.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -71,7 +71,7 @@ module.exports &#x3D; Location;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/Message.js</title>
<title>whatsapp-web.js 1.12.6 &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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -71,7 +71,7 @@ class Message extends Base {
* Indicates if the message has media available for download
* @type {boolean}
*/
this.hasMedia &#x3D; data.clientUrl ? true : false;
this.hasMedia &#x3D; data.clientUrl || data.deprecatedMms3Url ? true : false;
/**
* Message content
@@ -284,7 +284,9 @@ class Message extends Base {
return undefined;
}
const buffer &#x3D; await window.WWebJS.downloadBuffer(msg.clientUrl);
const mediaUrl &#x3D; msg.clientUrl || msg.deprecatedMms3Url;
const buffer &#x3D; await window.WWebJS.downloadBuffer(mediaUrl);
const decrypted &#x3D; await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype);
const data &#x3D; await window.WWebJS.readBlobAsync(decrypted._blob);
@@ -320,7 +322,7 @@ class Message extends Base {
* Stars this message
*/
async star() {
await this.pupPage.evaluate((msgId) &#x3D;&gt; {
await this.client.pupPage.evaluate((msgId) &#x3D;&gt; {
let msg &#x3D; window.Store.Msg.get(msgId);
if (msg.canStar()) {
@@ -333,7 +335,7 @@ class Message extends Base {
* Unstars this message
*/
async unstar() {
await this.pupPage.evaluate((msgId) &#x3D;&gt; {
await this.client.pupPage.evaluate((msgId) &#x3D;&gt; {
let msg &#x3D; window.Store.Msg.get(msgId);
if (msg.canStar()) {
@@ -384,7 +386,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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/MessageMedia.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/MessageMedia.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -86,7 +86,7 @@ module.exports &#x3D; MessageMedia;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/PrivateChat.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/PrivateChat.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -51,7 +51,7 @@ module.exports &#x3D; PrivateChat;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: structures/PrivateContact.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: structures/PrivateContact.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -51,7 +51,7 @@ module.exports &#x3D; PrivateContact;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: util/Constants.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: util/Constants.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -174,7 +174,7 @@ exports.MessageAck &#x3D; {
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: util/InterfaceController.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: util/InterfaceController.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -116,7 +116,7 @@ module.exports &#x3D; InterfaceController;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.6">
<meta charset="utf-8">
<title>whatsapp-web.js 1.12.0 &raquo; Source: util/Util.js</title>
<title>whatsapp-web.js 1.12.6 &raquo; Source: util/Util.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>12.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>12.<wbr>6</a>
</div>
</div>
</nav>
@@ -197,7 +197,7 @@ module.exports &#x3D; Util;</code></pre>
<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.6 on December 29, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on April 20, 2021.
</p>
</div>
</footer>

View File

@@ -259,6 +259,10 @@ client.on('change_battery', (batteryInfo) => {
console.log(`Battery: ${battery}% - Charging? ${plugged}`);
});
client.on('change_state', state => {
console.log('CHANGE STATE', state );
});
client.on('disconnected', (reason) => {
console.log('Client was logged out', reason);
});

14
index.d.ts vendored
View File

@@ -10,8 +10,14 @@ declare namespace WAWebJS {
/** Current connection information */
public info: ClientInfo
/** Puppeteer page running WhatsApp Web */
pupPage?: puppeteer.Page
/** Puppeteer browser running WhatsApp Web */
pupBrowser?: puppeteer.Browser
/**Accepts an invitation to join a group */
acceptInvite(inviteCode: string): Promise<void>
acceptInvite(inviteCode: string): Promise<string>
/**Returns an object with information about the invite code's group */
getInviteInfo(inviteCode: string): Promise<object>
@@ -78,7 +84,7 @@ declare namespace WAWebJS {
isRegisteredUser(contactId: string): Promise<boolean>
/** Get the registered WhatsApp ID for a number. Returns null if the number is not registered on WhatsApp. */
getNumberId(number: string): Promise<ContactId?>
getNumberId(number: string): Promise<ContactId | null>
/**
* Mutes the Chat until a specified date
@@ -143,8 +149,8 @@ declare namespace WAWebJS {
/** Emitted when the client has been disconnected */
on(event: 'disconnected', listener: (
/** state that caused the disconnect */
reason: WAState
/** reason that caused the disconnect */
reason: WAState | "NAVIGATED"
) => void): this
/** Emitted when a user joins the chat via invite link or is added by an admin */

View File

@@ -1,6 +1,6 @@
{
"name": "whatsapp-web.js",
"version": "1.12.0",
"version": "1.12.6",
"description": "Library for interacting with the WhatsApp Web API ",
"main": "./index.js",
"typings": "./index.d.ts",
@@ -28,7 +28,7 @@
},
"homepage": "https://waguide.pedroslopez.me/",
"dependencies": {
"@pedroslopez/moduleraid": "^4.1.0",
"@pedroslopez/moduleraid": "^5.0.0",
"fluent-ffmpeg": "^2.1.2",
"jsqr": "^1.3.1",
"mime": "^2.4.5",

View File

@@ -116,18 +116,18 @@ class Client extends EventEmitter {
} else {
const getQrCode = async () => {
// Check if retry button is present
var QR_RETRY_SELECTOR = 'div[data-ref] > span > div';
var QR_RETRY_SELECTOR = 'div[data-ref] > span > button';
var qrRetry = await page.$(QR_RETRY_SELECTOR);
if (qrRetry) {
await qrRetry.click();
}
// Wait for QR Code
const QR_CANVAS_SELECTOR = 'canvas';
await page.waitForSelector(QR_CANVAS_SELECTOR, { timeout: this.options.qrTimeoutMs });
const qrImgData = await page.$eval(QR_CANVAS_SELECTOR, canvas => [].slice.call(canvas.getContext('2d').getImageData(0, 0, 264, 264).data));
const qr = jsQR(qrImgData, 264, 264).data;
/**
* Emitted when the QR code is received
* @event Client#qr
@@ -335,7 +335,7 @@ class Client extends EventEmitter {
/**
* Emitted when the client has been disconnected
* @event Client#disconnected
* @param {WAState} reason state that caused the disconnect
* @param {WAState|"NAVIGATION"} reason reason that caused the disconnect
*/
this.emit(Events.DISCONNECTED, state);
this.destroy();
@@ -373,6 +373,13 @@ class Client extends EventEmitter {
* @event Client#ready
*/
this.emit(Events.READY);
// Disconnect when navigating away
// Because WhatsApp Web now reloads when logging out from the device, this also covers that case
this.pupPage.on('framenavigated', async () => {
this.emit(Events.DISCONNECTED, 'NAVIGATION');
await this.destroy();
});
}
/**
@@ -430,7 +437,7 @@ class Client extends EventEmitter {
* @property {string} [quotedMessageId] - Id of the message that is being quoted (or replied to)
* @property {Contact[]} [mentions] - Contacts that are being mentioned in the message
* @property {boolean} [sendSeen=true] - Mark the conversation as seen after sending the message
* @property {boolean} [media] - Media to be sent
* @property {MessageMedia} [media] - Media to be sent
*/
/**
@@ -556,6 +563,7 @@ class Client extends EventEmitter {
/**
* Accepts an invitation to join a group
* @param {string} inviteCode Invitation code
* @returns {Promise<string>} Id of the joined Chat
*/
async acceptInvite(inviteCode) {
const chatId = await this.pupPage.evaluate(async inviteCode => {

View File

@@ -40,7 +40,7 @@ class Message extends Base {
* Indicates if the message has media available for download
* @type {boolean}
*/
this.hasMedia = data.clientUrl ? true : false;
this.hasMedia = data.clientUrl || data.deprecatedMms3Url ? true : false;
/**
* Message content
@@ -253,7 +253,9 @@ class Message extends Base {
return undefined;
}
const buffer = await window.WWebJS.downloadBuffer(msg.clientUrl);
const mediaUrl = msg.clientUrl || msg.deprecatedMms3Url;
const buffer = await window.WWebJS.downloadBuffer(mediaUrl);
const decrypted = await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype);
const data = await window.WWebJS.readBlobAsync(decrypted._blob);
@@ -289,7 +291,7 @@ class Message extends Base {
* Stars this message
*/
async star() {
await this.pupPage.evaluate((msgId) => {
await this.client.pupPage.evaluate((msgId) => {
let msg = window.Store.Msg.get(msgId);
if (msg.canStar()) {
@@ -302,7 +304,7 @@ class Message extends Base {
* Unstars this message
*/
async unstar() {
await this.pupPage.evaluate((msgId) => {
await this.client.pupPage.evaluate((msgId) => {
let msg = window.Store.Msg.get(msgId);
if (msg.canStar()) {

View File

@@ -13,7 +13,7 @@ exports.ExposeStore = (moduleRaidStr) => {
window.Store.SendSeen = window.mR.findModule('sendSeen')[0];
window.Store.SendClear = window.mR.findModule('sendClear')[0];
window.Store.SendDelete = window.mR.findModule('sendDelete')[0];
window.Store.genId = window.mR.findModule((module) => module.default && typeof module.default === 'function' && module.default.toString().match(/crypto/))[0].default;
window.Store.genId = window.mR.findModule('randomId')[0].default;
window.Store.SendMessage = window.mR.findModule('addAndSendMsgToChat')[0];
window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default;
window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0];
@@ -185,6 +185,7 @@ exports.LoadUtils = () => {
const stickerInfo = {
...uploadedInfo,
clientUrl: uploadedInfo.url,
deprecatedMms3Url: uploadedInfo.url,
uploadhash: uploadedInfo.encFilehash,
size: file.size,
type: 'sticker',
@@ -235,10 +236,12 @@ exports.LoadUtils = () => {
mediaData.set({
clientUrl: mediaEntry.mmsUrl,
deprecatedMms3Url: mediaEntry.deprecatedMms3Url,
directPath: mediaEntry.directPath,
mediaKey: mediaEntry.mediaKey,
mediaKeyTimestamp: mediaEntry.mediaKeyTimestamp,
filehash: mediaObject.filehash,
encFilehash: mediaEntry.encFilehash,
uploadhash: mediaEntry.uploadHash,
size: mediaObject.size,
streamingSidecar: mediaEntry.sidecar,