docs: generate docs for the latest release (#3279)

* docs: generate docs for the latest release

* docs: mark version v1.26.0

* docs: mark WWeb version v2.3000.1016590837
This commit is contained in:
alechkos 2024-09-18 23:51:12 +03:00 • committed by GitHub
commit 01c45047d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 3898 additions and 891 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.23.0 &raquo; Source: structures/GroupChat.js</title>
<title>whatsapp-web.js 1.26.0 &raquo; Source: structures/GroupChat.js</title>
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
@ -15,7 +15,7 @@
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
<div id="jsdoc-navbar-container">
<div id="jsdoc-navbar-content">
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>23.<wbr>0</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>25.<wbr>0</a>
</div>
</div>
</nav>
@ -129,7 +129,7 @@ class GroupChat extends Chat {
419: &#x27;The participant can\&#x27;t be added because the group is full&#x27;
};
await window.Store.GroupMetadata.queryAndUpdate(groupWid);
await window.Store.GroupQueryAndUpdate(groupWid);
const groupMetadata &#x3D; group.groupMetadata;
const groupParticipants &#x3D; groupMetadata?.participants;
@ -183,7 +183,7 @@ class GroupChat extends Chat {
if (autoSendInviteV4 &amp;amp;&amp;amp; rpcResultCode &#x3D;&#x3D;&#x3D; 403) {
let userChat, isInviteV4Sent &#x3D; false;
window.Store.ContactCollection.gadd(pWid, { silent: true });
window.Store.Contact.gadd(pWid, { silent: true });
if (rpcResult.name &#x3D;&#x3D;&#x3D; &#x27;ParticipantRequestCodeCanBeSent&#x27; &amp;amp;&amp;amp;
(userChat &#x3D; await window.Store.Chat.find(pWid))) {
@ -312,6 +312,27 @@ class GroupChat extends Chat {
return true;
}
/**
* Updates the group setting to allow only admins to add members to the group.
* @param {boolean} [adminsOnly&#x3D;true] Enable or disable this option
* @returns {Promise&amp;lt;boolean&gt;} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.
*/
async setAddMembersAdminsOnly(adminsOnly&#x3D;true) {
const success &#x3D; await this.client.pupPage.evaluate(async (groupId, adminsOnly) &#x3D;&gt; {
const chatWid &#x3D; window.Store.WidFactory.createWid(groupId);
try {
const response &#x3D; await window.Store.GroupUtils.setGroupMemberAddMode(chatWid, &#x27;member_add_mode&#x27;, adminsOnly ? 0 : 1);
return response.name &#x3D;&#x3D;&#x3D; &#x27;SetMemberAddModeResponseSuccess&#x27;;
} catch (err) {
if(err.name &#x3D;&#x3D;&#x3D; &#x27;SmaxParsingFailure&#x27;) return false;
throw err;
}
}, this.id._serialized, adminsOnly);
success &amp;amp;&amp;amp; (this.groupMetadata.memberAddMode &#x3D; adminsOnly ? &#x27;admin_add&#x27; : &#x27;all_member_add&#x27;);
return success;
}
/**
* Updates the group settings to only allow admins to send messages.
* @param {boolean} [adminsOnly&#x3D;true] Enable or disable this option
@ -390,10 +411,18 @@ class GroupChat extends Chat {
async getInviteCode() {
const codeRes &#x3D; await this.client.pupPage.evaluate(async chatId &#x3D;&gt; {
const chatWid &#x3D; window.Store.WidFactory.createWid(chatId);
return window.Store.GroupInvite.queryGroupInviteCode(chatWid);
try {
return window.compareWwebVersions(window.Debug.VERSION, &#x27;&gt;&#x3D;&#x27;, &#x27;2.3000.0&#x27;)
? await window.Store.GroupInvite.queryGroupInviteCode(chatWid, true)
: await window.Store.GroupInvite.queryGroupInviteCode(chatWid);
}
catch (err) {
if(err.name &#x3D;&#x3D;&#x3D; &#x27;ServerStatusCodeError&#x27;) return undefined;
throw err;
}
}, this.id._serialized);
return codeRes.code;
return codeRes?.code;
}
/**
@ -485,7 +514,7 @@ module.exports &#x3D; GroupChat;
<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 October 21, 2023.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on September 18, 2024.
</p>
</div>
</footer>