chore: mark version v1.8.0

This commit is contained in:
Pedro Lopez
2020-08-25 23:06:36 -04:00
parent 502b22f6d7
commit 8627fc3d71
35 changed files with 1028 additions and 260 deletions

View File

@@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.4">
<meta charset="utf-8">
<title>whatsapp-web.js 1.7.0 &raquo; Source: structures/Chat.js</title>
<title>whatsapp-web.js 1.8.0 &raquo; Source: structures/Chat.js</title>
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
@@ -15,7 +15,7 @@
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
<div id="jsdoc-navbar-container">
<div id="jsdoc-navbar-content">
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>7.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>8.<wbr>0</a>
</div>
</div>
</nav>
@@ -77,7 +77,7 @@ class Chat extends Base {
this.unreadCount &#x3D; data.unreadCount;
/**
* Unix timestamp for when the chat was created
* Unix timestamp for when the last activity occurred
* @type {number}
*/
this.timestamp &#x3D; data.t;
@@ -94,7 +94,7 @@ class Chat extends Base {
/**
* Send a message to this chat
* @param {string|MessageMedia|Location} content
* @param {object} options
* @param {MessageSendOptions} [options]
* @returns {Promise&amp;lt;Message&gt;} Message that was just sent
*/
async sendMessage(content, options) {
@@ -150,7 +150,7 @@ class Chat extends Base {
async mute(unmuteDate) {
return this.client.muteChat(this.id._serialized, unmuteDate);
}
/**
* Unmutes this chat
*/
@@ -165,18 +165,18 @@ class Chat extends Base {
* @returns {Promise&amp;lt;Array&amp;lt;Message&gt;&gt;}
*/
async fetchMessages(searchOptions) {
if(!searchOptions || !searchOptions.limit) {
searchOptions &#x3D; {limit: 50};
if (!searchOptions || !searchOptions.limit) {
searchOptions &#x3D; { limit: 50 };
}
let messages &#x3D; await this.client.pupPage.evaluate(async (chatId, limit) &#x3D;&gt; {
const msgFilter &#x3D; m &#x3D;&gt; !m.isNotification; // dont include notification messages
const chat &#x3D; window.Store.Chat.get(chatId);
let msgs &#x3D; chat.msgs.models.filter(msgFilter);
while(msgs.length &amp;lt; limit) {
while (msgs.length &amp;lt; limit) {
const loadedMessages &#x3D; await chat.loadEarlierMsgs();
if(!loadedMessages) break;
if (!loadedMessages) break;
msgs &#x3D; [...loadedMessages.filter(msgFilter), ...msgs];
}
@@ -187,7 +187,7 @@ class Chat extends Base {
return messages.map(m &#x3D;&gt; new Message(this.client, m));
}
/**
* Simulate typing in chat. This will last for 25 seconds.
*/
@@ -197,7 +197,7 @@ class Chat extends Base {
return true;
}, this.id._serialized);
}
/**
* Simulate recording audio in chat. This will last for 25 seconds.
*/
@@ -207,7 +207,7 @@ class Chat extends Base {
return true;
}, this.id._serialized);
}
/**
* Stops typing or recording in chat immediately.
*/
@@ -217,6 +217,14 @@ class Chat extends Base {
return true;
}, this.id._serialized);
}
/**
* Returns the Contact that corresponds to this Chat.
* @returns {Promise&amp;lt;Contact&gt;}
*/
async getContact() {
return await this.client.getContactById(this.id._serialized);
}
}
module.exports &#x3D; Chat;
@@ -230,7 +238,7 @@ module.exports &#x3D; Chat;
<footer id="jsdoc-footer" class="jsdoc-footer">
<div id="jsdoc-footer-container">
<p>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.4 on June 18, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.4 on August 25, 2020.
</p>
</div>
</footer>