chore: mark version v1.23.0

This commit is contained in:
Pedro S Lopez 2023-10-21 11:37:45 -04:00
commit d2127832c6
70 changed files with 3740 additions and 402 deletions

View file

@ -4,7 +4,7 @@
<head>
<meta name="generator" content="JSDoc 3.6.11">
<meta charset="utf-8">
<title>whatsapp-web.js 1.22.1 &raquo; Source: structures/Message.js</title>
<title>whatsapp-web.js 1.23.0 &raquo; Source: structures/Message.js</title>
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
@ -15,7 +15,7 @@
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
<div id="jsdoc-navbar-container">
<div id="jsdoc-navbar-content">
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>22.<wbr>1</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>23.<wbr>0</a>
</div>
</div>
</nav>
@ -82,7 +82,7 @@ class Message extends Base {
* Message content
* @type {string}
*/
this.body &#x3D; this.hasMedia ? data.caption || &#x27;&#x27; : data.body || &#x27;&#x27;;
this.body &#x3D; this.hasMedia ? data.caption || &#x27;&#x27; : data.body || data.pollName || &#x27;&#x27;;
/**
* Message type
@ -182,7 +182,21 @@ class Message extends Base {
* Location information contained in the message, if the message is type &quot;location&quot;
* @type {Location}
*/
this.location &#x3D; data.type &#x3D;&#x3D;&#x3D; MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
this.location &#x3D; (() &#x3D;&gt; {
if (data.type !&#x3D;&#x3D; MessageTypes.LOCATION) {
return undefined;
}
let description;
if (data.loc &amp;amp;&amp;amp; typeof data.loc &#x3D;&#x3D;&#x3D; &#x27;string&#x27;) {
let splitted &#x3D; data.loc.split(&#x27;\n&#x27;);
description &#x3D; {
name: splitted[0],
address: splitted[1],
url: data.clientUrl
};
}
return new Location(data.lat, data.lng, description);
})();
/**
* List of vCards contained in the message.
@ -199,8 +213,8 @@ class Message extends Base {
inviteCodeExp: data.inviteCodeExp,
groupId: data.inviteGrp,
groupName: data.inviteGrpName,
fromId: data.from?._serialized ? data.from._serialized : data.from,
toId: data.to?._serialized ? data.to._serialized : data.to
fromId: &#x27;_serialized&#x27; in data.from ? data.from._serialized : data.from,
toId: &#x27;_serialized&#x27; in data.to ? data.to._serialized : data.to
} : undefined;
/**
@ -288,6 +302,20 @@ class Message extends Base {
this.selectedRowId &#x3D; data.listResponse.singleSelectReply.selectedRowId;
}
if (this.type &#x3D;&#x3D;&#x3D; MessageTypes.POLL_CREATION) {
this.pollName &#x3D; data.pollName;
this.pollOptions &#x3D; data.pollOptions;
this.allowMultipleAnswers &#x3D; Boolean(!data.pollSelectableOptionsCount);
this.pollInvalidated &#x3D; data.pollInvalidated;
this.isSentCagPollCreation &#x3D; data.isSentCagPollCreation;
delete this._data.pollName;
delete this._data.pollOptions;
delete this._data.pollSelectableOptionsCount;
delete this._data.pollInvalidated;
delete this._data.isSentCagPollCreation;
}
return super._patch(data);
}
@ -667,7 +695,7 @@ module.exports &#x3D; Message;
<footer id="jsdoc-footer" class="jsdoc-footer">
<div id="jsdoc-footer-container">
<p>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on August 10, 2023.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on October 21, 2023.
</p>
</div>
</footer>