mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19b1b9fdef | ||
|
|
a1d09e0e21 | ||
|
|
d86ccec5d1 | ||
|
|
f359ad40ee | ||
|
|
db7a8bcd3b | ||
|
|
edbf4139e7 | ||
|
|
709c43cc9f | ||
|
|
054ef4a84f | ||
|
|
c9bc0a1c8b | ||
|
|
6b3c8465e9 | ||
|
|
43aa6b3716 | ||
|
|
7738f7910b | ||
|
|
fc7a1a9974 | ||
|
|
b0465ceeff | ||
|
|
2abe4a157d | ||
|
|
e520a96b20 | ||
|
|
75296b652b | ||
|
|
b15ec768d3 | ||
|
|
42dd866a53 | ||
|
|
20e07c43d7 | ||
|
|
9b096db784 | ||
|
|
668106be2d | ||
|
|
cc5d85b2b1 | ||
|
|
3d06babed9 | ||
|
|
0ca909233d | ||
|
|
f4a2c44ed7 | ||
|
|
604656cf73 | ||
|
|
aedf41b762 | ||
|
|
bf2775d1f0 | ||
|
|
0b112004d5 | ||
|
|
336fb9b551 | ||
|
|
ba6ec7feab | ||
|
|
51a1028588 | ||
|
|
1c31139434 | ||
|
|
ee21e14547 | ||
|
|
cbf8fb7cf5 | ||
|
|
c7d5eb67ee | ||
|
|
7fcd43f100 | ||
|
|
a60f0ce139 | ||
|
|
ab0db80063 | ||
|
|
e7c76fe069 | ||
|
|
233382ce7a | ||
|
|
e08dd7d835 | ||
|
|
a1e8e8cf51 | ||
|
|
a1e0970e1e | ||
|
|
c827b32328 | ||
|
|
2345b5c4ee |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -66,3 +66,6 @@ typings/
|
||||
|
||||
# macOS Thumbnails
|
||||
._*
|
||||
|
||||
# Test sessions
|
||||
*session.json
|
||||
8
.npmignore
Normal file
8
.npmignore
Normal file
@@ -0,0 +1,8 @@
|
||||
docs/*
|
||||
.github/*
|
||||
|
||||
.eslintrc.json
|
||||
.jsdoc.json
|
||||
.editorconfig
|
||||
|
||||
session.json
|
||||
@@ -1,4 +1,4 @@
|
||||
[](https://www.npmjs.com/package/whatsapp-web.js) [](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765)  [](https://discord.gg/H7DqQs4)
|
||||
[](https://www.npmjs.com/package/whatsapp-web.js) [](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765)  [](https://discord.gg/H7DqQs4)
|
||||
|
||||
# whatsapp-web.js
|
||||
A WhatsApp API client that connects through the WhatsApp Web browser app
|
||||
@@ -49,18 +49,20 @@ Take a look at [example.js](https://github.com/pedroslopez/whatsapp-web.js/blob/
|
||||
| Send media (video) | ✅ [(requires google chrome)](https://github.com/pedroslopez/whatsapp-web.js/issues/78#issuecomment-592723583) |
|
||||
| Send stickers | _pending_ |
|
||||
| Receive media (images/audio/video/documents) | ✅ |
|
||||
| Send contact cards | _pending_ |
|
||||
| Send contact cards | ✅ |
|
||||
| Send location | ✅ |
|
||||
| Receive location | ✅ |
|
||||
| Message replies | ✅ |
|
||||
| Join groups by invite | ✅ |
|
||||
| Get invite for group | ✅ |
|
||||
| Modify group info (subject, description) | ✅ |
|
||||
| Modify group settings (send messages, edit info) | ✅ |
|
||||
| Add group participants | ✅ |
|
||||
| Kick group participants | ✅ |
|
||||
| Promote/demote group participants | ✅ |
|
||||
| Mention users | ✅ |
|
||||
| Mute/unmute chats | ✅ |
|
||||
| Block/unblock contacts | ✅ |
|
||||
| Get contact info | ✅ |
|
||||
| Get profile pictures | ✅ |
|
||||
| Set user status message | ✅ |
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Base</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Base</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Base.js.html#source-line-7">structures/<wbr>Base.<wbr>js:7</a></p>
|
||||
<p class="source-link">Source: <a href="structures_Base.js.html#source-line-6">structures/<wbr>Base.<wbr>js:6</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a WhatsApp data structure</p>
|
||||
</div>
|
||||
@@ -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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: BusinessContact</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -45,19 +45,22 @@
|
||||
<dt><a href="BusinessContact.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#isBlocked">isBlocked</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#isBusiness">isBusiness</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#isEnterprise">isEnterprise</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="BusinessContact.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#isMe">isMe</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -70,13 +73,13 @@
|
||||
<dt><a href="BusinessContact.html#isWAContact">isWAContact</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="BusinessContact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#number">number</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -95,6 +98,9 @@
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="BusinessContact.html#block">block()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#getChat">getChat()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -105,6 +111,9 @@
|
||||
<dt><a href="BusinessContact.html#getProfilePicUrl">getProfilePicUrl()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#unblock">unblock()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
@@ -133,6 +142,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#id">Contact#id</a></dd>
|
||||
</dl>
|
||||
<h3 id="isBlocked"><span class="symbol-name">isBlocked</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if you have blocked this contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#isBlocked">Contact#isBlocked</a></dd>
|
||||
</dl>
|
||||
<h3 id="isBusiness"><span class="symbol-name">isBusiness</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the contact is a business contact</p>
|
||||
@@ -213,6 +229,15 @@
|
||||
</section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="block"><span class="symbol-name">block</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Blocks this contact from WhatsApp</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#block">Contact#block</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getChat"><span class="symbol-name">getChat</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Chat.html">Chat</a></span></span></h3>
|
||||
<p>Returns the Chat that corresponds to this Contact.
|
||||
@@ -232,6 +257,15 @@
|
||||
<dt>Returns</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unblock"><span class="symbol-name">unblock</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unblocks this contact from WhatsApp</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#unblock">Contact#unblock</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -242,7 +276,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Chat</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Chat</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Chat.js.html#source-line-11">structures/<wbr>Chat.<wbr>js:11</a></p>
|
||||
<p class="source-link">Source: <a href="structures_Chat.js.html#source-line-10">structures/<wbr>Chat.<wbr>js:10</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Chat on WhatsApp</p>
|
||||
</div>
|
||||
@@ -48,6 +48,9 @@
|
||||
<dt><a href="Chat.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#isMuted">isMuted</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
@@ -55,16 +58,22 @@
|
||||
<dt><a href="Chat.html#isReadOnly">isReadOnly</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#muteExpiration">muteExpiration</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#timestamp">timestamp</a></dt>
|
||||
<dt><a href="Chat.html#pinned">pinned</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Chat.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#unreadCount">unreadCount</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -102,19 +111,22 @@
|
||||
<dt><a href="Chat.html#mute">mute(unmuteDate)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#pin">pin()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#sendMessage">sendMessage(content[, options])</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#sendSeen">sendSeen()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Chat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#sendStateTyping">sendStateTyping()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -124,6 +136,9 @@
|
||||
<dt><a href="Chat.html#unmute">unmute()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#unpin">unpin()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,16 +169,31 @@
|
||||
<p>Indicates if the Chat is a Group Chat</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isMuted"><span class="symbol-name">isMuted</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Indicates if the chat is muted or not</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the Chat is readonly</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="muteExpiration"><span class="symbol-name">muteExpiration</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Unix timestamp for when the mute expires</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Title of the chat</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="pinned"><span class="symbol-name">pinned</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the Chat is pinned</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Unix timestamp for when the last activity occurred</p>
|
||||
@@ -188,7 +218,8 @@
|
||||
<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>
|
||||
@@ -203,7 +234,8 @@
|
||||
<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>
|
||||
@@ -317,6 +349,17 @@
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="pin"><span class="symbol-name">pin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Pins this chat</p>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(content[, options])</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Send a message to this chat</p>
|
||||
<section>
|
||||
@@ -363,7 +406,8 @@
|
||||
<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>
|
||||
@@ -373,7 +417,8 @@
|
||||
<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>
|
||||
@@ -397,6 +442,17 @@
|
||||
<p>Unmutes this chat</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unpin"><span class="symbol-name">unpin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unpins this chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing boolean</code>
|
||||
<p>New pin state</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -407,7 +463,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Client</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Client</span></h1>
|
||||
<p class="source-link">Source: <a href="Client.js.html#source-line-51">Client.<wbr>js:51</a></p>
|
||||
<p class="source-link">Source: <a href="Client.js.html#source-line-50">Client.<wbr>js:50</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Starting point for interacting with the WhatsApp Web API</p>
|
||||
</div>
|
||||
@@ -79,13 +79,13 @@
|
||||
<dt><a href="Client.html#getContacts">getContacts()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#getInviteInfo">getInviteInfo(inviteCode)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#getInviteInfo">getInviteInfo(inviteCode)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#getProfilePicUrl">getProfilePicUrl(contactId)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -107,13 +107,16 @@
|
||||
<dt><a href="Client.html#muteChat">muteChat(chatId, unmuteDate)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#pinChat">pinChat()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#resetState">resetState()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#resetState">resetState()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#sendMessage">sendMessage(chatId, content[, options])</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -135,6 +138,9 @@
|
||||
<dt><a href="Client.html#unmuteChat">unmuteChat(chatId)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#unpinChat">unpinChat()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -552,15 +558,18 @@
|
||||
<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>
|
||||
@@ -695,7 +704,8 @@
|
||||
<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>
|
||||
@@ -852,6 +862,17 @@
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="pinChat"><span class="symbol-name">pinChat</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Pins the Chat</p>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="resetState"><span class="symbol-name">resetState</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||||
<p>Force reset of connection state for the client</p>
|
||||
<dl class="dl-compact">
|
||||
@@ -889,7 +910,7 @@
|
||||
<p>content</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>(string, <a href="MessageMedia.html">MessageMedia</a>, or <a href="Location.html">Location</a>)</p>
|
||||
<p>(string, <a href="MessageMedia.html">MessageMedia</a>, <a href="Location.html">Location</a>, <a href="Contact.html">Contact</a>, or Array of <a href="Contact.html">Contact</a>)</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
@@ -917,7 +938,8 @@
|
||||
<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>
|
||||
@@ -960,7 +982,8 @@
|
||||
<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>
|
||||
@@ -1076,6 +1099,17 @@
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unpinChat"><span class="symbol-name">unpinChat</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unpins the Chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing boolean</code>
|
||||
<p>New pin state</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Events</h2>
|
||||
<section>
|
||||
@@ -1722,7 +1756,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: Client.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -386,12 +386,12 @@ class Client extends EventEmitter {
|
||||
});
|
||||
|
||||
await page.evaluate(() => {
|
||||
window.Store.Msg.on('add', (msg) => { if (msg.isNewMsg) window.onAddMessageEvent(msg); });
|
||||
window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(msg); });
|
||||
window.Store.Msg.on('change:type', (msg) => { window.onChangeMessageTypeEvent(msg); });
|
||||
window.Store.Msg.on('change:ack', (msg, ack) => { window.onMessageAckEvent(msg, ack); });
|
||||
window.Store.Msg.on('change:isUnsentMedia', (msg, unsent) => { if (msg.id.fromMe &amp;&amp; !unsent) window.onMessageMediaUploadedEvent(msg); });
|
||||
window.Store.Msg.on('remove', (msg) => { if (msg.isNewMsg) window.onRemoveMessageEvent(msg); });
|
||||
window.Store.Msg.on('add', (msg) => { if (msg.isNewMsg) window.onAddMessageEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('change:type', (msg) => { window.onChangeMessageTypeEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('change:ack', (msg,ack) => { window.onMessageAckEvent(window.WWebJS.getMessageModel(msg), ack); });
|
||||
window.Store.Msg.on('change:isUnsentMedia', (msg, unsent) => { if (msg.id.fromMe &amp;&amp; !unsent) window.onMessageMediaUploadedEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('remove', (msg) => { if (msg.isNewMsg) window.onRemoveMessageEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.AppState.on('change:state', (_AppState, state) => { window.onAppStateChangedEvent(state); });
|
||||
window.Store.Conn.on('change:battery', (state) => { window.onBatteryStateChangedEvent(state); });
|
||||
});
|
||||
@@ -451,6 +451,7 @@ class Client extends EventEmitter {
|
||||
* @typedef {Object} MessageSendOptions
|
||||
* @property {boolean} [linkPreview=true] - Show links preview
|
||||
* @property {boolean} [sendAudioAsVoice=false] - Send audio as voice message
|
||||
* @property {boolean} [parseVCards=true] - Automatically parse vCards and send them as contacts
|
||||
* @property {string} [caption] - Image or video caption
|
||||
* @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
|
||||
@@ -461,7 +462,7 @@ class Client extends EventEmitter {
|
||||
/**
|
||||
* Send a message to a specific chatId
|
||||
* @param {string} chatId
|
||||
* @param {string|MessageMedia|Location} content
|
||||
* @param {string|MessageMedia|Location|Contact|Array&lt;Contact>} content
|
||||
* @param {MessageSendOptions} [options] - Options used when sending the message
|
||||
*
|
||||
* @returns {Promise&lt;Message>} Message that was just sent
|
||||
@@ -472,6 +473,7 @@ class Client extends EventEmitter {
|
||||
sendAudioAsVoice: options.sendAudioAsVoice,
|
||||
caption: options.caption,
|
||||
quotedMessageId: options.quotedMessageId,
|
||||
parseVCards: options.parseVCards === false ? false : true,
|
||||
mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : []
|
||||
};
|
||||
|
||||
@@ -487,6 +489,12 @@ class Client extends EventEmitter {
|
||||
} else if (content instanceof Location) {
|
||||
internalOptions.location = content;
|
||||
content = '';
|
||||
} else if(content instanceof Contact) {
|
||||
internalOptions.contactCard = content.id._serialized;
|
||||
content = '';
|
||||
} else if(Array.isArray(content) &amp;&amp; content.length > 0 &amp;&amp; content[0] instanceof Contact) {
|
||||
internalOptions.contactCardList = content.map(contact => contact.id._serialized);
|
||||
content = '';
|
||||
}
|
||||
|
||||
const newMessage = await this.pupPage.evaluate(async (chatId, message, options, sendSeen) => {
|
||||
@@ -509,8 +517,8 @@ class Client extends EventEmitter {
|
||||
* @returns {Promise&lt;Array&lt;Chat>>}
|
||||
*/
|
||||
async getChats() {
|
||||
let chats = await this.pupPage.evaluate(() => {
|
||||
return window.WWebJS.getChats();
|
||||
let chats = await this.pupPage.evaluate(async () => {
|
||||
return await window.WWebJS.getChats();
|
||||
});
|
||||
|
||||
return chats.map(chat => ChatFactory.create(this, chat));
|
||||
@@ -522,8 +530,8 @@ class Client extends EventEmitter {
|
||||
* @returns {Promise&lt;Chat>}
|
||||
*/
|
||||
async getChatById(chatId) {
|
||||
let chat = await this.pupPage.evaluate(chatId => {
|
||||
return window.WWebJS.getChat(chatId);
|
||||
let chat = await this.pupPage.evaluate(async chatId => {
|
||||
return await window.WWebJS.getChat(chatId);
|
||||
}, chatId);
|
||||
|
||||
return ChatFactory.create(this, chat);
|
||||
@@ -641,6 +649,43 @@ class Client extends EventEmitter {
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pins the Chat
|
||||
* @returns {Promise&lt;boolean>} New pin state. Could be false if the max number of pinned chats was reached.
|
||||
*/
|
||||
async pinChat(chatId) {
|
||||
return this.pupPage.evaluate(async chatId => {
|
||||
let chat = window.Store.Chat.get(chatId);
|
||||
if (chat.pin) {
|
||||
return true;
|
||||
}
|
||||
const MAX_PIN_COUNT = 3;
|
||||
if (window.Store.Chat.models.length > MAX_PIN_COUNT) {
|
||||
let maxPinned = window.Store.Chat.models[MAX_PIN_COUNT - 1].pin;
|
||||
if (maxPinned) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
await window.Store.Cmd.pinChat(chat, true);
|
||||
return true;
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpins the Chat
|
||||
* @returns {Promise&lt;boolean>} New pin state
|
||||
*/
|
||||
async unpinChat(chatId) {
|
||||
return this.pupPage.evaluate(async chatId => {
|
||||
let chat = window.Store.Chat.get(chatId);
|
||||
if (!chat.pin) {
|
||||
return false;
|
||||
}
|
||||
await window.Store.Cmd.pinChat(chat, false);
|
||||
return false;
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutes the Chat until a specified date
|
||||
* @param {string} chatId ID of the chat that will be muted
|
||||
@@ -748,7 +793,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: ClientInfo</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">ClientInfo</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_ClientInfo.js.html#source-line-10">structures/<wbr>ClientInfo.<wbr>js:10</a></p>
|
||||
<p class="source-link">Source: <a href="structures_ClientInfo.js.html#source-line-9">structures/<wbr>ClientInfo.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Current connection information</p>
|
||||
</div>
|
||||
@@ -58,6 +58,11 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="ClientInfo.html#wid">wid</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,8 +95,9 @@
|
||||
<section>
|
||||
<h3 id="me"><span class="symbol-name">me</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>Current user ID</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Deprecated</dt>
|
||||
<dd>Use .wid instead</dd>
|
||||
</dl>
|
||||
<h3 id="phone"><span class="symbol-name">phone</span><small class="property-type">
|
||||
object</small></h3>
|
||||
@@ -193,6 +199,11 @@
|
||||
<p>Name configured to be shown in push notifications</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="wid"><span class="symbol-name">wid</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>Current user ID</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Method</h2>
|
||||
<section>
|
||||
@@ -202,15 +213,18 @@
|
||||
<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>
|
||||
@@ -224,7 +238,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Contact</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Contact</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Contact.js.html#source-line-10">structures/<wbr>Contact.<wbr>js:10</a></p>
|
||||
<p class="source-link">Source: <a href="structures_Contact.js.html#source-line-9">structures/<wbr>Contact.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Contact on WhatsApp</p>
|
||||
</div>
|
||||
@@ -42,6 +42,9 @@
|
||||
<dt><a href="Contact.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#isBlocked">isBlocked</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#isBusiness">isBusiness</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -67,13 +70,13 @@
|
||||
<dt><a href="Contact.html#isWAContact">isWAContact</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Contact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#number">number</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -92,6 +95,9 @@
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Contact.html#block">block()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#getChat">getChat()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -102,6 +108,9 @@
|
||||
<dt><a href="Contact.html#getProfilePicUrl">getProfilePicUrl()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#unblock">unblock()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
@@ -124,6 +133,11 @@
|
||||
<p>ID that represents the contact</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isBlocked"><span class="symbol-name">isBlocked</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if you have blocked this contact</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isBusiness"><span class="symbol-name">isBusiness</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the contact is a business contact</p>
|
||||
@@ -182,6 +196,15 @@
|
||||
</section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="block"><span class="symbol-name">block</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Blocks this contact from WhatsApp</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing boolean</code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getChat"><span class="symbol-name">getChat</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Chat.html">Chat</a></span></span></h3>
|
||||
<p>Returns the Chat that corresponds to this Contact.
|
||||
@@ -201,6 +224,15 @@
|
||||
<p><code>Promise containing string</code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unblock"><span class="symbol-name">unblock</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unblocks this contact from WhatsApp</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing boolean</code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -211,7 +243,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: GroupChat</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -51,16 +51,22 @@
|
||||
<dt><a href="GroupChat.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#isGroup">isGroup</a></dt>
|
||||
<dt><a href="GroupChat.html#isMuted">isMuted</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#isReadOnly">isReadOnly</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#muteExpiration">muteExpiration</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -74,6 +80,9 @@
|
||||
<dt><a href="GroupChat.html#participants">participants</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#pinned">pinned</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -113,19 +122,22 @@
|
||||
<dt><a href="GroupChat.html#getContact">getContact()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#getInviteCode">getInviteCode()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#getInviteCode">getInviteCode()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#leave">leave()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#mute">mute(unmuteDate)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#pin">pin()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#promoteParticipants">promoteParticipants(participantIds)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -141,19 +153,25 @@
|
||||
<dt><a href="GroupChat.html#sendSeen">sendSeen()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#sendStateTyping">sendStateTyping()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#setDescription">setDescription(description)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#setInfoAdminsOnly">setInfoAdminsOnly([adminsOnly])</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#setMessagesAdminsOnly">setMessagesAdminsOnly([adminsOnly])</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#setSubject">setSubject(subject)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -163,6 +181,9 @@
|
||||
<dt><a href="GroupChat.html#unmute">unmute()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#unpin">unpin()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -209,6 +230,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isGroup">Chat#isGroup</a></dd>
|
||||
</dl>
|
||||
<h3 id="isMuted"><span class="symbol-name">isMuted</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the chat is muted or not</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isMuted">Chat#isMuted</a></dd>
|
||||
</dl>
|
||||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is readonly</p>
|
||||
@@ -216,6 +244,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isReadOnly">Chat#isReadOnly</a></dd>
|
||||
</dl>
|
||||
<h3 id="muteExpiration"><span class="symbol-name">muteExpiration</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Unix timestamp for when the mute expires</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#muteExpiration">Chat#muteExpiration</a></dd>
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Title of the chat</p>
|
||||
@@ -232,6 +267,13 @@
|
||||
<p>Gets the group participants</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="pinned"><span class="symbol-name">pinned</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is pinned</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#pinned">Chat#pinned</a></dd>
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Unix timestamp for when the last activity occurred</p>
|
||||
@@ -473,6 +515,17 @@
|
||||
<dd><a href="Chat.html#mute">Chat#mute</a></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="pin"><span class="symbol-name">pin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Pins this chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#pin">Chat#pin</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p>New pin state. Could be false if the max number of pinned chats was reached.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="promoteParticipants"><span class="symbol-name">promoteParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||||
<p>Promotes participants by IDs to admins</p>
|
||||
<section>
|
||||
@@ -654,6 +707,88 @@
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="setInfoAdminsOnly"><span class="symbol-name">setInfoAdminsOnly</span><span class="signature"><span class="signature-params">([adminsOnly])</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Updates the group settings to only allow admins to edit group info (title, description, photo).</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>adminsOnly</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>boolean</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Yes</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Enable or disable this option</p>
|
||||
<p>Defaults to <code>true</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="setMessagesAdminsOnly"><span class="symbol-name">setMessagesAdminsOnly</span><span class="signature"><span class="signature-params">([adminsOnly])</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Updates the group settings to only allow admins to send messages.</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>adminsOnly</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>boolean</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Yes</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Enable or disable this option</p>
|
||||
<p>Defaults to <code>true</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="setSubject"><span class="symbol-name">setSubject</span><span class="signature"><span class="signature-params">(subject)</span></span></h3>
|
||||
<p>Updates the group subject</p>
|
||||
<section>
|
||||
@@ -700,6 +835,17 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#unmute">Chat#unmute</a></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unpin"><span class="symbol-name">unpin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unpins this chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#unpin">Chat#unpin</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p>New pin state</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -710,7 +856,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: GroupNotification</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">GroupNotification</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_GroupNotification.js.html#source-line-10">structures/<wbr>GroupNotification.<wbr>js:10</a></p>
|
||||
<p class="source-link">Source: <a href="structures_GroupNotification.js.html#source-line-9">structures/<wbr>GroupNotification.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a GroupNotification on WhatsApp</p>
|
||||
</div>
|
||||
@@ -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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: InterfaceController</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">InterfaceController</span></h1>
|
||||
<p class="source-link">Source: <a href="util_InterfaceController.js.html#source-line-8">util/<wbr>InterfaceController.<wbr>js:8</a></p>
|
||||
<p class="source-link">Source: <a href="util_InterfaceController.js.html#source-line-6">util/<wbr>InterfaceController.<wbr>js:6</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Interface Controller</p>
|
||||
</div>
|
||||
@@ -187,7 +187,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Location</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Location</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Location.js.html#source-line-12">structures/<wbr>Location.<wbr>js:12</a></p>
|
||||
<p class="source-link">Source: <a href="structures_Location.js.html#source-line-6">structures/<wbr>Location.<wbr>js:6</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Location information</p>
|
||||
</div>
|
||||
@@ -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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Message</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Message</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Message.js.html#source-line-13">structures/<wbr>Message.<wbr>js:13</a></p>
|
||||
<p class="source-link">Source: <a href="structures_Message.js.html#source-line-12">structures/<wbr>Message.<wbr>js:12</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Message on WhatsApp</p>
|
||||
</div>
|
||||
@@ -73,16 +73,19 @@
|
||||
<dt><a href="Message.html#isForwarded">isForwarded</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#location">location</a></dt>
|
||||
<dt><a href="Message.html#isStatus">isStatus</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#mediaKey">mediaKey</a></dt>
|
||||
<dt><a href="Message.html#location">location</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#mediaKey">mediaKey</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#mentionedIds">mentionedIds</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -95,6 +98,9 @@
|
||||
<dt><a href="Message.html#type">type</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#vCards">vCards</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -201,6 +207,11 @@
|
||||
<p>Indicates if the message was forwarded</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isStatus"><span class="symbol-name">isStatus</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the message is a status update</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="location"><span class="symbol-name">location</span><small class="property-type">
|
||||
<a href="Location.html">Location</a></small></h3>
|
||||
<p>Location information contained in the message, if the message is type "location"</p>
|
||||
@@ -233,6 +244,11 @@
|
||||
<p>Message type</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="vCards"><span class="symbol-name">vCards</span><small class="property-type">
|
||||
Array of string</small></h3>
|
||||
<p>List of vCards contained in the message.</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
@@ -427,7 +443,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: MessageMedia</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">MessageMedia</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_MessageMedia.js.html#source-line-14">structures/<wbr>MessageMedia.<wbr>js:14</a></p>
|
||||
<p class="source-link">Source: <a href="structures_MessageMedia.js.html#source-line-13">structures/<wbr>MessageMedia.<wbr>js:13</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Media attached to a message</p>
|
||||
</div>
|
||||
@@ -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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: PrivateChat</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -48,6 +48,9 @@
|
||||
<dt><a href="PrivateChat.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#isMuted">isMuted</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
@@ -55,16 +58,22 @@
|
||||
<dt><a href="PrivateChat.html#isReadOnly">isReadOnly</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#muteExpiration">muteExpiration</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#timestamp">timestamp</a></dt>
|
||||
<dt><a href="PrivateChat.html#pinned">pinned</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateChat.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#unreadCount">unreadCount</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -102,19 +111,22 @@
|
||||
<dt><a href="PrivateChat.html#mute">mute(unmuteDate)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#pin">pin()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#sendMessage">sendMessage(content[, options])</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#sendSeen">sendSeen()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateChat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#sendStateTyping">sendStateTyping()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -124,6 +136,9 @@
|
||||
<dt><a href="PrivateChat.html#unmute">unmute()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#unpin">unpin()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,6 +175,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isGroup">Chat#isGroup</a></dd>
|
||||
</dl>
|
||||
<h3 id="isMuted"><span class="symbol-name">isMuted</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the chat is muted or not</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isMuted">Chat#isMuted</a></dd>
|
||||
</dl>
|
||||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is readonly</p>
|
||||
@@ -167,6 +189,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isReadOnly">Chat#isReadOnly</a></dd>
|
||||
</dl>
|
||||
<h3 id="muteExpiration"><span class="symbol-name">muteExpiration</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Unix timestamp for when the mute expires</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#muteExpiration">Chat#muteExpiration</a></dd>
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Title of the chat</p>
|
||||
@@ -174,6 +203,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#name">Chat#name</a></dd>
|
||||
</dl>
|
||||
<h3 id="pinned"><span class="symbol-name">pinned</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is pinned</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#pinned">Chat#pinned</a></dd>
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Unix timestamp for when the last activity occurred</p>
|
||||
@@ -339,6 +375,17 @@
|
||||
<dd><a href="Chat.html#mute">Chat#mute</a></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="pin"><span class="symbol-name">pin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Pins this chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#pin">Chat#pin</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p>New pin state. Could be false if the max number of pinned chats was reached.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(content[, options])</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Send a message to this chat</p>
|
||||
<section>
|
||||
@@ -429,6 +476,17 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#unmute">Chat#unmute</a></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unpin"><span class="symbol-name">unpin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unpins this chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#unpin">Chat#unpin</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p>New pin state</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -439,7 +497,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: PrivateContact</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -42,6 +42,9 @@
|
||||
<dt><a href="PrivateContact.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#isBlocked">isBlocked</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#isBusiness">isBusiness</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -67,13 +70,13 @@
|
||||
<dt><a href="PrivateContact.html#isWAContact">isWAContact</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateContact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#number">number</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -92,6 +95,9 @@
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateContact.html#block">block()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#getChat">getChat()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -102,6 +108,9 @@
|
||||
<dt><a href="PrivateContact.html#getProfilePicUrl">getProfilePicUrl()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#unblock">unblock()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
@@ -126,6 +135,13 @@
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#id">Contact#id</a></dd>
|
||||
</dl>
|
||||
<h3 id="isBlocked"><span class="symbol-name">isBlocked</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if you have blocked this contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#isBlocked">Contact#isBlocked</a></dd>
|
||||
</dl>
|
||||
<h3 id="isBusiness"><span class="symbol-name">isBusiness</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the contact is a business contact</p>
|
||||
@@ -206,6 +222,15 @@
|
||||
</section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="block"><span class="symbol-name">block</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Blocks this contact from WhatsApp</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#block">Contact#block</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getChat"><span class="symbol-name">getChat</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Chat.html">Chat</a></span></span></h3>
|
||||
<p>Returns the Chat that corresponds to this Contact.
|
||||
@@ -225,6 +250,15 @@
|
||||
<dt>Returns</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="unblock"><span class="symbol-name">unblock</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||||
<p>Unblocks this contact from WhatsApp</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#unblock">Contact#unblock</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -235,7 +269,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Class: Util</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -26,7 +26,7 @@
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Util</span></h1>
|
||||
<p class="source-link">Source: <a href="util_Util.js.html#source-line-10">util/<wbr>Util.<wbr>js:10</a></p>
|
||||
<p class="source-link">Source: <a href="util_Util.js.html#source-line-8">util/<wbr>Util.<wbr>js:8</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Utility methods</p>
|
||||
</div>
|
||||
@@ -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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Globals</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -1071,6 +1071,21 @@
|
||||
<p>Defaults to <code>false</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>parseVCards</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>boolean</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Yes</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Automatically parse vCards and send them as contacts</p>
|
||||
<p>Defaults to <code>true</code>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>caption</p>
|
||||
@@ -1157,7 +1172,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
239
docs/index.html
239
docs/index.html
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Home</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -27,11 +27,11 @@
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>
|
||||
whatsapp-web.js 1.8.0
|
||||
whatsapp-web.js 1.11.1
|
||||
</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.2035.12-brightgreen.svg" alt="WhatsApp_Web 2.2035.12"> <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.2047.10-brightgreen.svg" alt="WhatsApp_Web 2.2047.10"> <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>
|
||||
@@ -96,7 +96,7 @@ client.initialize();
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Send contact cards</td>
|
||||
<td><em>pending</em></td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Send location</td>
|
||||
@@ -122,6 +122,10 @@ client.initialize();
|
||||
<td>Modify group info (subject, description)</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Modify group settings (send messages, edit info)</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add group participants</td>
|
||||
<td>✅</td>
|
||||
@@ -142,6 +146,10 @@ client.initialize();
|
||||
<td>Mute/unmute chats</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Block/unblock contacts</td>
|
||||
<td>✅</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Get contact info</td>
|
||||
<td>✅</td>
|
||||
@@ -217,6 +225,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="BusinessContact.html#block" class="!symbol-index-name">BusinessContact#<wbr>block()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="BusinessContact.html#businessProfile" class="!symbol-index-name">BusinessContact#<wbr>businessProfile</a>
|
||||
</dt>
|
||||
@@ -238,7 +251,7 @@ client.initialize();
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="BusinessContact.html#isBusiness" class="!symbol-index-name">BusinessContact#<wbr>isBusiness</a>
|
||||
<a href="BusinessContact.html#isBlocked" class="!symbol-index-name">BusinessContact#<wbr>isBlocked</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -246,6 +259,11 @@ client.initialize();
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="BusinessContact.html#isBusiness" class="!symbol-index-name">BusinessContact#<wbr>isBusiness</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="BusinessContact.html#isEnterprise" class="!symbol-index-name">BusinessContact#<wbr>isEnterprise</a>
|
||||
</dt>
|
||||
@@ -300,6 +318,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="BusinessContact.html#unblock" class="!symbol-index-name">BusinessContact#<wbr>unblock()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -346,10 +369,6 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#getContact" class="!symbol-index-name">Chat#<wbr>getContact()</a>
|
||||
</dt>
|
||||
@@ -360,11 +379,20 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#isGroup" class="!symbol-index-name">Chat#<wbr>isGroup</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#isMuted" class="!symbol-index-name">Chat#<wbr>isMuted</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#isReadOnly" class="!symbol-index-name">Chat#<wbr>isReadOnly</a>
|
||||
</dt>
|
||||
@@ -375,11 +403,26 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#muteExpiration" class="!symbol-index-name">Chat#<wbr>muteExpiration</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#name" class="!symbol-index-name">Chat#<wbr>name</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#pin" class="!symbol-index-name">Chat#<wbr>pin()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#pinned" class="!symbol-index-name">Chat#<wbr>pinned</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#sendMessage" class="!symbol-index-name">Chat#<wbr>sendMessage(content[, options])</a>
|
||||
</dt>
|
||||
@@ -419,6 +462,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#unpin" class="!symbol-index-name">Chat#<wbr>unpin()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Chat.html#unreadCount" class="!symbol-index-name">Chat#<wbr>unreadCount</a>
|
||||
</dt>
|
||||
@@ -539,15 +587,15 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#event:message" class="!symbol-index-name">Client#<wbr>event:message</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#event:message_ack" class="!symbol-index-name">Client#<wbr>event:message_ack</a>
|
||||
</dt>
|
||||
@@ -613,10 +661,6 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#getWWebVersion" class="!symbol-index-name">Client#<wbr>getWWebVersion()</a>
|
||||
</dt>
|
||||
@@ -627,6 +671,10 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#initialize" class="!symbol-index-name">Client#<wbr>initialize()</a>
|
||||
</dt>
|
||||
@@ -647,6 +695,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#pinChat" class="!symbol-index-name">Client#<wbr>pinChat()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#resetState" class="!symbol-index-name">Client#<wbr>resetState()</a>
|
||||
</dt>
|
||||
@@ -687,6 +740,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Client.html#unpinChat" class="!symbol-index-name">Client#<wbr>unpinChat()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -708,24 +766,20 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="ClientInfo.html#me" class="!symbol-index-name">ClientInfo#<wbr>me</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="ClientInfo.html#phone" class="!symbol-index-name">ClientInfo#<wbr>phone</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="ClientInfo.html#platform" class="!symbol-index-name">ClientInfo#<wbr>platform</a>
|
||||
</dt>
|
||||
@@ -738,6 +792,15 @@ client.initialize();
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="ClientInfo.html#wid" class="!symbol-index-name">ClientInfo#<wbr>wid</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -752,6 +815,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Contact.html#block" class="!symbol-index-name">Contact#<wbr>block()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Contact.html#getChat" class="!symbol-index-name">Contact#<wbr>getChat()</a>
|
||||
</dt>
|
||||
@@ -768,7 +836,7 @@ client.initialize();
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Contact.html#isBusiness" class="!symbol-index-name">Contact#<wbr>isBusiness</a>
|
||||
<a href="Contact.html#isBlocked" class="!symbol-index-name">Contact#<wbr>isBlocked</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -776,6 +844,11 @@ client.initialize();
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Contact.html#isBusiness" class="!symbol-index-name">Contact#<wbr>isBusiness</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Contact.html#isEnterprise" class="!symbol-index-name">Contact#<wbr>isEnterprise</a>
|
||||
</dt>
|
||||
@@ -830,6 +903,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Contact.html#unblock" class="!symbol-index-name">Contact#<wbr>unblock()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1000,10 +1078,6 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#getInviteCode" class="!symbol-index-name">GroupChat#<wbr>getInviteCode()</a>
|
||||
</dt>
|
||||
@@ -1014,11 +1088,20 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#isGroup" class="!symbol-index-name">GroupChat#<wbr>isGroup</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#isMuted" class="!symbol-index-name">GroupChat#<wbr>isMuted</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#isReadOnly" class="!symbol-index-name">GroupChat#<wbr>isReadOnly</a>
|
||||
</dt>
|
||||
@@ -1034,6 +1117,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#muteExpiration" class="!symbol-index-name">GroupChat#<wbr>muteExpiration</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#name" class="!symbol-index-name">GroupChat#<wbr>name</a>
|
||||
</dt>
|
||||
@@ -1049,6 +1137,16 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#pin" class="!symbol-index-name">GroupChat#<wbr>pin()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#pinned" class="!symbol-index-name">GroupChat#<wbr>pinned</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#promoteParticipants" class="!symbol-index-name">GroupChat#<wbr>promoteParticipants(participantIds)</a>
|
||||
</dt>
|
||||
@@ -1093,6 +1191,16 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#setInfoAdminsOnly" class="!symbol-index-name">GroupChat#<wbr>setInfoAdminsOnly([adminsOnly])</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#setMessagesAdminsOnly" class="!symbol-index-name">GroupChat#<wbr>setMessagesAdminsOnly([adminsOnly])</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#setSubject" class="!symbol-index-name">GroupChat#<wbr>setSubject(subject)</a>
|
||||
</dt>
|
||||
@@ -1113,6 +1221,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#unpin" class="!symbol-index-name">GroupChat#<wbr>unpin()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="GroupChat.html#unreadCount" class="!symbol-index-name">GroupChat#<wbr>unreadCount</a>
|
||||
</dt>
|
||||
@@ -1453,6 +1566,11 @@ client.initialize();
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Message.html#isStatus" class="!symbol-index-name">Message#<wbr>isStatus</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Message.html#location" class="!symbol-index-name">Message#<wbr>location</a>
|
||||
</dt>
|
||||
@@ -1488,6 +1606,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="Message.html#vCards" class="!symbol-index-name">Message#<wbr>vCards</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1706,10 +1829,6 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#getContact" class="!symbol-index-name">PrivateChat#<wbr>getContact()</a>
|
||||
</dt>
|
||||
@@ -1720,11 +1839,20 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#isGroup" class="!symbol-index-name">PrivateChat#<wbr>isGroup</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#isMuted" class="!symbol-index-name">PrivateChat#<wbr>isMuted</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#isReadOnly" class="!symbol-index-name">PrivateChat#<wbr>isReadOnly</a>
|
||||
</dt>
|
||||
@@ -1735,11 +1863,26 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#muteExpiration" class="!symbol-index-name">PrivateChat#<wbr>muteExpiration</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#name" class="!symbol-index-name">PrivateChat#<wbr>name</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#pin" class="!symbol-index-name">PrivateChat#<wbr>pin()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#pinned" class="!symbol-index-name">PrivateChat#<wbr>pinned</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#sendMessage" class="!symbol-index-name">PrivateChat#<wbr>sendMessage(content[, options])</a>
|
||||
</dt>
|
||||
@@ -1779,6 +1922,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#unpin" class="!symbol-index-name">PrivateChat#<wbr>unpin()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateChat.html#unreadCount" class="!symbol-index-name">PrivateChat#<wbr>unreadCount</a>
|
||||
</dt>
|
||||
@@ -1800,6 +1948,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateContact.html#block" class="!symbol-index-name">PrivateContact#<wbr>block()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateContact.html#getChat" class="!symbol-index-name">PrivateContact#<wbr>getChat()</a>
|
||||
</dt>
|
||||
@@ -1816,7 +1969,7 @@ client.initialize();
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateContact.html#isBusiness" class="!symbol-index-name">PrivateContact#<wbr>isBusiness</a>
|
||||
<a href="PrivateContact.html#isBlocked" class="!symbol-index-name">PrivateContact#<wbr>isBlocked</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
@@ -1824,6 +1977,11 @@ client.initialize();
|
||||
</div>
|
||||
<div class="symbol-index-column">
|
||||
<dl class="symbol-index-list">
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateContact.html#isBusiness" class="!symbol-index-name">PrivateContact#<wbr>isBusiness</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateContact.html#isEnterprise" class="!symbol-index-name">PrivateContact#<wbr>isEnterprise</a>
|
||||
</dt>
|
||||
@@ -1878,6 +2036,11 @@ client.initialize();
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt class="symbol-index-name">
|
||||
<a href="PrivateContact.html#unblock" class="!symbol-index-name">PrivateContact#<wbr>unblock()</a>
|
||||
</dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2029,7 +2192,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/Base.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -60,7 +60,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/BusinessContact.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -59,7 +59,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/Chat.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -88,6 +88,24 @@ class Chat extends Base {
|
||||
*/
|
||||
this.archived = data.archive;
|
||||
|
||||
/**
|
||||
* Indicates if the Chat is pinned
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.pinned = !!data.pin;
|
||||
|
||||
/**
|
||||
* Indicates if the chat is muted or not
|
||||
* @type {number}
|
||||
*/
|
||||
this.isMuted = data.isMuted;
|
||||
|
||||
/**
|
||||
* Unix timestamp for when the mute expires
|
||||
* @type {number}
|
||||
*/
|
||||
this.muteExpiration = data.muteExpiration;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
@@ -143,6 +161,22 @@ class Chat extends Base {
|
||||
return this.client.unarchiveChat(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pins this chat
|
||||
* @returns {Promise&lt;boolean>} New pin state. Could be false if the max number of pinned chats was reached.
|
||||
*/
|
||||
async pin() {
|
||||
return this.client.pinChat(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpins this chat
|
||||
* @returns {Promise&lt;boolean>} New pin state
|
||||
*/
|
||||
async unpin() {
|
||||
return this.client.unpinChat(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutes this chat until a specified date
|
||||
* @param {Date} unmuteDate Date at which the Chat will be unmuted
|
||||
@@ -181,7 +215,8 @@ class Chat extends Base {
|
||||
}
|
||||
|
||||
msgs.sort((a, b) => (a.t > b.t) ? 1 : -1);
|
||||
return msgs.splice(msgs.length - limit).map(m => m.serialize());
|
||||
if (msgs.length > limit) msgs = msgs.splice(msgs.length - limit);
|
||||
return msgs.map(m => window.WWebJS.getMessageModel(m));
|
||||
|
||||
}, this.id._serialized, searchOptions.limit);
|
||||
|
||||
@@ -238,7 +273,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/ClientInfo.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -41,7 +41,7 @@ class ClientInfo extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
if (data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
@@ -51,11 +51,17 @@ class ClientInfo extends Base {
|
||||
*/
|
||||
this.pushname = data.pushname;
|
||||
|
||||
/**
|
||||
* @type {object}
|
||||
* @deprecated Use .wid instead
|
||||
*/
|
||||
this.me = data.wid;
|
||||
|
||||
/**
|
||||
* Current user ID
|
||||
* @type {object}
|
||||
*/
|
||||
this.me = data.me;
|
||||
this.wid = data.wid;
|
||||
|
||||
/**
|
||||
* Information about the phone this client is connected to
|
||||
@@ -102,7 +108,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/Contact.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -126,6 +126,12 @@ class Contact extends Base {
|
||||
*/
|
||||
this.isMyContact = data.isMyContact;
|
||||
|
||||
/**
|
||||
* Indicates if you have blocked this contact
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isBlocked = data.isBlocked;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
@@ -147,6 +153,36 @@ class Contact extends Base {
|
||||
|
||||
return await this.client.getChatById(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks this contact from WhatsApp
|
||||
* @returns {Promise&lt;boolean>}
|
||||
*/
|
||||
async block() {
|
||||
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);
|
||||
}, this.id._serialized);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unblocks this contact from WhatsApp
|
||||
* @returns {Promise&lt;boolean>}
|
||||
*/
|
||||
async unblock() {
|
||||
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);
|
||||
}, this.id._serialized);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -160,7 +196,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/GroupChat.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -66,6 +66,7 @@ class GroupChat extends Chat {
|
||||
get description() {
|
||||
return this.groupMetadata.desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the group participants
|
||||
* @type {array}
|
||||
@@ -143,6 +144,38 @@ class GroupChat extends Chat {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the group settings to only allow admins to send messages.
|
||||
* @param {boolean} [adminsOnly=true] Enable or disable this option
|
||||
* @returns {Promise&lt;boolean>} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.
|
||||
*/
|
||||
async setMessagesAdminsOnly(adminsOnly=true) {
|
||||
let res = await this.client.pupPage.evaluate((chatId, value) => {
|
||||
return window.Store.Wap.setGroupProperty(chatId, 'announcement', value);
|
||||
}, this.id._serialized, adminsOnly);
|
||||
|
||||
if (res.status !== 200) return false;
|
||||
|
||||
this.groupMetadata.announce = adminsOnly;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the group settings to only allow admins to edit group info (title, description, photo).
|
||||
* @param {boolean} [adminsOnly=true] Enable or disable this option
|
||||
* @returns {Promise&lt;boolean>} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.
|
||||
*/
|
||||
async setInfoAdminsOnly(adminsOnly=true) {
|
||||
let res = await this.client.pupPage.evaluate((chatId, value) => {
|
||||
return window.Store.Wap.setGroupProperty(chatId, 'restrict', value);
|
||||
}, this.id._serialized, adminsOnly);
|
||||
|
||||
if (res.status !== 200) return false;
|
||||
|
||||
this.groupMetadata.restrict = adminsOnly;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the invite code for a specific group
|
||||
*/
|
||||
@@ -188,7 +221,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/GroupNotification.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -143,7 +143,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/Location.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -71,7 +71,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/Message.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -118,6 +118,12 @@ class Message extends Base {
|
||||
*/
|
||||
this.isForwarded = data.isForwarded;
|
||||
|
||||
/**
|
||||
* Indicates if the message is a status update
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isStatus = data.isStatusV3;
|
||||
|
||||
/**
|
||||
* Indicates if the message was a broadcast
|
||||
* @type {boolean}
|
||||
@@ -142,6 +148,12 @@ class Message extends Base {
|
||||
*/
|
||||
this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
|
||||
|
||||
/**
|
||||
* List of vCards contained in the message.
|
||||
* @type {Array&lt;string>}
|
||||
*/
|
||||
this.vCards = data.type === MessageTypes.CONTACT_CARD_MULTI ? data.vcardList.map((c) => c.vcard) : data.type === MessageTypes.CONTACT_CARD ? [data.body] : [];
|
||||
|
||||
/**
|
||||
* Indicates the mentions in the message body.
|
||||
* @type {Array&lt;string>}
|
||||
@@ -304,7 +316,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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/MessageMedia.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -86,7 +86,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/PrivateChat.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -51,7 +51,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: structures/PrivateContact.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -51,7 +51,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: util/Constants.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -173,7 +173,7 @@ exports.MessageAck = {
|
||||
<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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: util/InterfaceController.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -94,7 +94,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.4">
|
||||
<meta name="generator" content="JSDoc 3.6.6">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.8.0 » Source: util/Util.js</title>
|
||||
<title>whatsapp-web.js 1.11.1 » 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>8.<wbr>0</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>11.<wbr>1</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -73,7 +73,7 @@ module.exports = 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.4 on August 25, 2020.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.6 on November 19, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -166,9 +166,12 @@ client.on('message', async msg => {
|
||||
} else {
|
||||
msg.reply('I can only delete my own messages');
|
||||
}
|
||||
} else if (msg.body === '!pin') {
|
||||
const chat = await msg.getChat();
|
||||
await chat.pin();
|
||||
} else if (msg.body === '!archive') {
|
||||
const chat = await msg.getChat();
|
||||
chat.archive();
|
||||
await chat.archive();
|
||||
} else if (msg.body === '!mute') {
|
||||
const chat = await msg.getChat();
|
||||
// mute the chat for 20 seconds
|
||||
|
||||
1432
index.d.ts
vendored
1432
index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "whatsapp-web.js",
|
||||
"version": "1.8.0",
|
||||
"version": "1.11.1",
|
||||
"description": "Library for interacting with the WhatsApp Web API ",
|
||||
"main": "./index.js",
|
||||
"typings": "./index.d.ts",
|
||||
@@ -31,7 +31,7 @@
|
||||
"@pedroslopez/moduleraid": "^4.1.0",
|
||||
"jsqr": "^1.3.1",
|
||||
"mime": "^2.4.5",
|
||||
"puppeteer": "^3.0.4"
|
||||
"puppeteer": "^5.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0",
|
||||
|
||||
@@ -355,12 +355,12 @@ class Client extends EventEmitter {
|
||||
});
|
||||
|
||||
await page.evaluate(() => {
|
||||
window.Store.Msg.on('add', (msg) => { if (msg.isNewMsg) window.onAddMessageEvent(msg); });
|
||||
window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(msg); });
|
||||
window.Store.Msg.on('change:type', (msg) => { window.onChangeMessageTypeEvent(msg); });
|
||||
window.Store.Msg.on('change:ack', (msg, ack) => { window.onMessageAckEvent(msg, ack); });
|
||||
window.Store.Msg.on('change:isUnsentMedia', (msg, unsent) => { if (msg.id.fromMe && !unsent) window.onMessageMediaUploadedEvent(msg); });
|
||||
window.Store.Msg.on('remove', (msg) => { if (msg.isNewMsg) window.onRemoveMessageEvent(msg); });
|
||||
window.Store.Msg.on('add', (msg) => { if (msg.isNewMsg) window.onAddMessageEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('change', (msg) => { window.onChangeMessageEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('change:type', (msg) => { window.onChangeMessageTypeEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('change:ack', (msg,ack) => { window.onMessageAckEvent(window.WWebJS.getMessageModel(msg), ack); });
|
||||
window.Store.Msg.on('change:isUnsentMedia', (msg, unsent) => { if (msg.id.fromMe && !unsent) window.onMessageMediaUploadedEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.Msg.on('remove', (msg) => { if (msg.isNewMsg) window.onRemoveMessageEvent(window.WWebJS.getMessageModel(msg)); });
|
||||
window.Store.AppState.on('change:state', (_AppState, state) => { window.onAppStateChangedEvent(state); });
|
||||
window.Store.Conn.on('change:battery', (state) => { window.onBatteryStateChangedEvent(state); });
|
||||
});
|
||||
@@ -420,6 +420,7 @@ class Client extends EventEmitter {
|
||||
* @typedef {Object} MessageSendOptions
|
||||
* @property {boolean} [linkPreview=true] - Show links preview
|
||||
* @property {boolean} [sendAudioAsVoice=false] - Send audio as voice message
|
||||
* @property {boolean} [parseVCards=true] - Automatically parse vCards and send them as contacts
|
||||
* @property {string} [caption] - Image or video caption
|
||||
* @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
|
||||
@@ -430,7 +431,7 @@ class Client extends EventEmitter {
|
||||
/**
|
||||
* Send a message to a specific chatId
|
||||
* @param {string} chatId
|
||||
* @param {string|MessageMedia|Location} content
|
||||
* @param {string|MessageMedia|Location|Contact|Array<Contact>} content
|
||||
* @param {MessageSendOptions} [options] - Options used when sending the message
|
||||
*
|
||||
* @returns {Promise<Message>} Message that was just sent
|
||||
@@ -441,6 +442,7 @@ class Client extends EventEmitter {
|
||||
sendAudioAsVoice: options.sendAudioAsVoice,
|
||||
caption: options.caption,
|
||||
quotedMessageId: options.quotedMessageId,
|
||||
parseVCards: options.parseVCards === false ? false : true,
|
||||
mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : []
|
||||
};
|
||||
|
||||
@@ -456,6 +458,12 @@ class Client extends EventEmitter {
|
||||
} else if (content instanceof Location) {
|
||||
internalOptions.location = content;
|
||||
content = '';
|
||||
} else if(content instanceof Contact) {
|
||||
internalOptions.contactCard = content.id._serialized;
|
||||
content = '';
|
||||
} else if(Array.isArray(content) && content.length > 0 && content[0] instanceof Contact) {
|
||||
internalOptions.contactCardList = content.map(contact => contact.id._serialized);
|
||||
content = '';
|
||||
}
|
||||
|
||||
const newMessage = await this.pupPage.evaluate(async (chatId, message, options, sendSeen) => {
|
||||
@@ -478,8 +486,8 @@ class Client extends EventEmitter {
|
||||
* @returns {Promise<Array<Chat>>}
|
||||
*/
|
||||
async getChats() {
|
||||
let chats = await this.pupPage.evaluate(() => {
|
||||
return window.WWebJS.getChats();
|
||||
let chats = await this.pupPage.evaluate(async () => {
|
||||
return await window.WWebJS.getChats();
|
||||
});
|
||||
|
||||
return chats.map(chat => ChatFactory.create(this, chat));
|
||||
@@ -491,8 +499,8 @@ class Client extends EventEmitter {
|
||||
* @returns {Promise<Chat>}
|
||||
*/
|
||||
async getChatById(chatId) {
|
||||
let chat = await this.pupPage.evaluate(chatId => {
|
||||
return window.WWebJS.getChat(chatId);
|
||||
let chat = await this.pupPage.evaluate(async chatId => {
|
||||
return await window.WWebJS.getChat(chatId);
|
||||
}, chatId);
|
||||
|
||||
return ChatFactory.create(this, chat);
|
||||
@@ -610,6 +618,43 @@ class Client extends EventEmitter {
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pins the Chat
|
||||
* @returns {Promise<boolean>} New pin state. Could be false if the max number of pinned chats was reached.
|
||||
*/
|
||||
async pinChat(chatId) {
|
||||
return this.pupPage.evaluate(async chatId => {
|
||||
let chat = window.Store.Chat.get(chatId);
|
||||
if (chat.pin) {
|
||||
return true;
|
||||
}
|
||||
const MAX_PIN_COUNT = 3;
|
||||
if (window.Store.Chat.models.length > MAX_PIN_COUNT) {
|
||||
let maxPinned = window.Store.Chat.models[MAX_PIN_COUNT - 1].pin;
|
||||
if (maxPinned) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
await window.Store.Cmd.pinChat(chat, true);
|
||||
return true;
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpins the Chat
|
||||
* @returns {Promise<boolean>} New pin state
|
||||
*/
|
||||
async unpinChat(chatId) {
|
||||
return this.pupPage.evaluate(async chatId => {
|
||||
let chat = window.Store.Chat.get(chatId);
|
||||
if (!chat.pin) {
|
||||
return false;
|
||||
}
|
||||
await window.Store.Cmd.pinChat(chat, false);
|
||||
return false;
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutes the Chat until a specified date
|
||||
* @param {string} chatId ID of the chat that will be muted
|
||||
|
||||
@@ -57,6 +57,24 @@ class Chat extends Base {
|
||||
*/
|
||||
this.archived = data.archive;
|
||||
|
||||
/**
|
||||
* Indicates if the Chat is pinned
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.pinned = !!data.pin;
|
||||
|
||||
/**
|
||||
* Indicates if the chat is muted or not
|
||||
* @type {number}
|
||||
*/
|
||||
this.isMuted = data.isMuted;
|
||||
|
||||
/**
|
||||
* Unix timestamp for when the mute expires
|
||||
* @type {number}
|
||||
*/
|
||||
this.muteExpiration = data.muteExpiration;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
@@ -112,6 +130,22 @@ class Chat extends Base {
|
||||
return this.client.unarchiveChat(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pins this chat
|
||||
* @returns {Promise<boolean>} New pin state. Could be false if the max number of pinned chats was reached.
|
||||
*/
|
||||
async pin() {
|
||||
return this.client.pinChat(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpins this chat
|
||||
* @returns {Promise<boolean>} New pin state
|
||||
*/
|
||||
async unpin() {
|
||||
return this.client.unpinChat(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mutes this chat until a specified date
|
||||
* @param {Date} unmuteDate Date at which the Chat will be unmuted
|
||||
@@ -150,7 +184,8 @@ class Chat extends Base {
|
||||
}
|
||||
|
||||
msgs.sort((a, b) => (a.t > b.t) ? 1 : -1);
|
||||
return msgs.splice(msgs.length - limit).map(m => m.serialize());
|
||||
if (msgs.length > limit) msgs = msgs.splice(msgs.length - limit);
|
||||
return msgs.map(m => window.WWebJS.getMessageModel(m));
|
||||
|
||||
}, this.id._serialized, searchOptions.limit);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class ClientInfo extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
if (data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
@@ -20,11 +20,17 @@ class ClientInfo extends Base {
|
||||
*/
|
||||
this.pushname = data.pushname;
|
||||
|
||||
/**
|
||||
* @type {object}
|
||||
* @deprecated Use .wid instead
|
||||
*/
|
||||
this.me = data.wid;
|
||||
|
||||
/**
|
||||
* Current user ID
|
||||
* @type {object}
|
||||
*/
|
||||
this.me = data.me;
|
||||
this.wid = data.wid;
|
||||
|
||||
/**
|
||||
* Information about the phone this client is connected to
|
||||
|
||||
@@ -95,6 +95,12 @@ class Contact extends Base {
|
||||
*/
|
||||
this.isMyContact = data.isMyContact;
|
||||
|
||||
/**
|
||||
* Indicates if you have blocked this contact
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isBlocked = data.isBlocked;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
@@ -116,6 +122,36 @@ class Contact extends Base {
|
||||
|
||||
return await this.client.getChatById(this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks this contact from WhatsApp
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
async block() {
|
||||
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);
|
||||
}, this.id._serialized);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unblocks this contact from WhatsApp
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
async unblock() {
|
||||
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);
|
||||
}, this.id._serialized);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ class GroupChat extends Chat {
|
||||
get description() {
|
||||
return this.groupMetadata.desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the group participants
|
||||
* @type {array}
|
||||
@@ -112,6 +113,38 @@ class GroupChat extends Chat {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the group settings to only allow admins to send messages.
|
||||
* @param {boolean} [adminsOnly=true] Enable or disable this option
|
||||
* @returns {Promise<boolean>} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.
|
||||
*/
|
||||
async setMessagesAdminsOnly(adminsOnly=true) {
|
||||
let res = await this.client.pupPage.evaluate((chatId, value) => {
|
||||
return window.Store.Wap.setGroupProperty(chatId, 'announcement', value);
|
||||
}, this.id._serialized, adminsOnly);
|
||||
|
||||
if (res.status !== 200) return false;
|
||||
|
||||
this.groupMetadata.announce = adminsOnly;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the group settings to only allow admins to edit group info (title, description, photo).
|
||||
* @param {boolean} [adminsOnly=true] Enable or disable this option
|
||||
* @returns {Promise<boolean>} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.
|
||||
*/
|
||||
async setInfoAdminsOnly(adminsOnly=true) {
|
||||
let res = await this.client.pupPage.evaluate((chatId, value) => {
|
||||
return window.Store.Wap.setGroupProperty(chatId, 'restrict', value);
|
||||
}, this.id._serialized, adminsOnly);
|
||||
|
||||
if (res.status !== 200) return false;
|
||||
|
||||
this.groupMetadata.restrict = adminsOnly;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the invite code for a specific group
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,12 @@ class Message extends Base {
|
||||
*/
|
||||
this.isForwarded = data.isForwarded;
|
||||
|
||||
/**
|
||||
* Indicates if the message is a status update
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isStatus = data.isStatusV3;
|
||||
|
||||
/**
|
||||
* Indicates if the message was a broadcast
|
||||
* @type {boolean}
|
||||
@@ -111,6 +117,12 @@ class Message extends Base {
|
||||
*/
|
||||
this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
|
||||
|
||||
/**
|
||||
* List of vCards contained in the message.
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
this.vCards = data.type === MessageTypes.CONTACT_CARD_MULTI ? data.vcardList.map((c) => c.vcard) : data.type === MessageTypes.CONTACT_CARD ? [data.body] : [];
|
||||
|
||||
/**
|
||||
* Indicates the mentions in the message body.
|
||||
* @type {Array<string>}
|
||||
|
||||
@@ -5,7 +5,7 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
eval('var moduleRaid = ' + moduleRaidStr);
|
||||
// eslint-disable-next-line no-undef
|
||||
window.mR = moduleRaid();
|
||||
window.Store = window.mR.findModule('Chat')[1].default;
|
||||
window.Store = window.mR.findModule('Chat')[0].default;
|
||||
window.Store.AppState = window.mR.findModule('STREAM')[0].default;
|
||||
window.Store.Conn = window.mR.findModule('Conn')[0].default;
|
||||
window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0];
|
||||
@@ -17,15 +17,18 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
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];
|
||||
window.Store.OpaqueData = window.mR.findModule('getOrCreateOpaqueDataForPath')[0];
|
||||
window.Store.OpaqueData = window.mR.findModule(module => module.default && module.default.createFromData)[0].default;
|
||||
window.Store.MediaPrep = window.mR.findModule('MediaPrep')[0];
|
||||
window.Store.MediaObject = window.mR.findModule('getOrCreateMediaObject')[0];
|
||||
window.Store.MediaUpload = window.mR.findModule('uploadMedia')[0];
|
||||
window.Store.Cmd = window.mR.findModule('Cmd')[0].default;
|
||||
window.Store.MediaTypes = window.mR.findModule('msgToMediaType')[0];
|
||||
window.Store.VCard = window.mR.findModule('vcardFromContactModel')[0];
|
||||
window.Store.UserConstructor = window.mR.findModule((module) => (module.default && module.default.prototype && module.default.prototype.isServer && module.default.prototype.isUser) ? module.default : null)[0].default;
|
||||
window.Store.Validators = window.mR.findModule('findLinks')[0];
|
||||
window.Store.WidFactory = window.mR.findModule('createWid')[0];
|
||||
window.Store.BlockContact = window.mR.findModule('blockContact')[0];
|
||||
window.Store.GroupMetadata = window.mR.findModule((module) => module.default && module.default.handlePendingInvite)[0].default;
|
||||
};
|
||||
|
||||
exports.LoadUtils = () => {
|
||||
@@ -78,6 +81,39 @@ exports.LoadUtils = () => {
|
||||
delete options.location;
|
||||
}
|
||||
|
||||
let vcardOptions = {};
|
||||
if (options.contactCard) {
|
||||
let contact = window.Store.Contact.get(options.contactCard);
|
||||
vcardOptions = {
|
||||
body: window.Store.VCard.vcardFromContactModel(contact).vcard,
|
||||
type: 'vcard',
|
||||
vcardFormattedName: contact.formattedName
|
||||
};
|
||||
delete options.contactCard;
|
||||
} else if (options.contactCardList) {
|
||||
let contacts = options.contactCardList.map(c => window.Store.Contact.get(c));
|
||||
let vcards = contacts.map(c => window.Store.VCard.vcardFromContactModel(c));
|
||||
vcardOptions = {
|
||||
type: 'multi_vcard',
|
||||
vcardList: vcards,
|
||||
body: undefined
|
||||
};
|
||||
delete options.contactCardList;
|
||||
} else if (options.parseVCards && typeof (content) === 'string' && content.startsWith('BEGIN:VCARD')) {
|
||||
delete options.parseVCards;
|
||||
try {
|
||||
const parsed = window.Store.VCard.parseVcard(content);
|
||||
if (parsed) {
|
||||
vcardOptions = {
|
||||
type: 'vcard',
|
||||
vcardFormattedName: window.Store.VCard.vcardGetNameFromParsed(parsed)
|
||||
};
|
||||
}
|
||||
} catch (_) {
|
||||
// not a vcard
|
||||
}
|
||||
}
|
||||
|
||||
if (options.linkPreview) {
|
||||
delete options.linkPreview;
|
||||
const link = window.Store.Validators.findLink(content);
|
||||
@@ -90,8 +126,8 @@ exports.LoadUtils = () => {
|
||||
}
|
||||
|
||||
const newMsgId = new window.Store.MsgKey({
|
||||
from: window.Store.Conn.me,
|
||||
to: chat.id,
|
||||
fromMe: true,
|
||||
remote: chat.id,
|
||||
id: window.Store.genId(),
|
||||
});
|
||||
|
||||
@@ -100,7 +136,7 @@ exports.LoadUtils = () => {
|
||||
id: newMsgId,
|
||||
ack: 0,
|
||||
body: content,
|
||||
from: window.Store.Conn.me,
|
||||
from: window.Store.Conn.wid,
|
||||
to: chat.id,
|
||||
local: true,
|
||||
self: 'out',
|
||||
@@ -109,7 +145,8 @@ exports.LoadUtils = () => {
|
||||
type: 'chat',
|
||||
...locationOptions,
|
||||
...attOptions,
|
||||
...quotedMsgOptions
|
||||
...quotedMsgOptions,
|
||||
...vcardOptions
|
||||
};
|
||||
|
||||
await window.Store.SendMessage.addAndSendMsgToChat(chat, message);
|
||||
@@ -118,7 +155,7 @@ exports.LoadUtils = () => {
|
||||
|
||||
window.WWebJS.processMediaData = async (mediaInfo, forceVoice) => {
|
||||
const file = window.WWebJS.mediaInfoToFile(mediaInfo);
|
||||
const mData = await window.Store.OpaqueData.default.createFromData(file, file.type);
|
||||
const mData = await window.Store.OpaqueData.createFromData(file, file.type);
|
||||
const mediaPrep = window.Store.MediaPrep.prepRawMedia(mData, {});
|
||||
const mediaData = await mediaPrep.waitForPrep();
|
||||
const mediaObject = window.Store.MediaObject.getOrCreateMediaObject(mediaData.filehash);
|
||||
@@ -132,8 +169,8 @@ exports.LoadUtils = () => {
|
||||
mediaData.type = 'ptt';
|
||||
}
|
||||
|
||||
if (!(mediaData.mediaBlob instanceof window.Store.OpaqueData.default)) {
|
||||
mediaData.mediaBlob = await window.Store.OpaqueData.default.createFromData(mediaData.mediaBlob, mediaData.mediaBlob.type);
|
||||
if (!(mediaData.mediaBlob instanceof window.Store.OpaqueData)) {
|
||||
mediaData.mediaBlob = await window.Store.OpaqueData.createFromData(mediaData.mediaBlob, mediaData.mediaBlob.type);
|
||||
}
|
||||
|
||||
mediaData.renderableUrl = mediaData.mediaBlob.url();
|
||||
@@ -166,26 +203,42 @@ exports.LoadUtils = () => {
|
||||
return mediaData;
|
||||
};
|
||||
|
||||
window.WWebJS.getChatModel = chat => {
|
||||
window.WWebJS.getMessageModel = message => {
|
||||
const msg = message.serialize();
|
||||
msg.isStatusV3 = message.isStatusV3;
|
||||
if (msg.buttons) {
|
||||
msg.buttons = msg.buttons.serialize();
|
||||
}
|
||||
delete msg.pendingAckUpdate;
|
||||
return msg;
|
||||
};
|
||||
|
||||
window.WWebJS.getChatModel = async chat => {
|
||||
let res = chat.serialize();
|
||||
res.isGroup = chat.isGroup;
|
||||
res.formattedTitle = chat.formattedTitle;
|
||||
res.isMuted = chat.mute && chat.mute.isMuted;
|
||||
|
||||
if (chat.groupMetadata) {
|
||||
await window.Store.GroupMetadata.update(chat.id._serialized);
|
||||
res.groupMetadata = chat.groupMetadata.serialize();
|
||||
}
|
||||
|
||||
delete res.msgs;
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
window.WWebJS.getChat = chatId => {
|
||||
window.WWebJS.getChat = async chatId => {
|
||||
const chat = window.Store.Chat.get(chatId);
|
||||
return window.WWebJS.getChatModel(chat);
|
||||
return await window.WWebJS.getChatModel(chat);
|
||||
};
|
||||
|
||||
window.WWebJS.getChats = () => {
|
||||
window.WWebJS.getChats = async () => {
|
||||
const chats = window.Store.Chat.models;
|
||||
return chats.map(chat => window.WWebJS.getChatModel(chat));
|
||||
|
||||
const chatPromises = chats.map(chat => window.WWebJS.getChatModel(chat));
|
||||
return await Promise.all(chatPromises);
|
||||
};
|
||||
|
||||
window.WWebJS.getContactModel = contact => {
|
||||
@@ -201,6 +254,7 @@ exports.LoadUtils = () => {
|
||||
res.isGroup = contact.isGroup;
|
||||
res.isWAContact = contact.isWAContact;
|
||||
res.isMyContact = contact.isMyContact;
|
||||
res.isBlocked = contact.isContactBlocked;
|
||||
res.userid = contact.userid;
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user