chore(v1.34.7): bump version and generate docs
This commit is contained in:
parent
211205363c
commit
f935b50011
77 changed files with 5207 additions and 2669 deletions
103
docs/util_InterfaceController.js.html
generated
103
docs/util_InterfaceController.js.html
generated
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.11">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.34.6 » Source: util/InterfaceController.js</title>
|
||||
<title>whatsapp-web.js 1.34.7 » 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>34.<wbr>6</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>34.<wbr>7</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -35,7 +35,6 @@
|
|||
* Interface Controller
|
||||
*/
|
||||
class InterfaceController {
|
||||
|
||||
constructor(props) {
|
||||
this.pupPage = props.pupPage;
|
||||
}
|
||||
|
|
@ -46,8 +45,12 @@ class InterfaceController {
|
|||
*/
|
||||
async openChatWindow(chatId) {
|
||||
return await this.pupPage.evaluate(async (chatId) => {
|
||||
const chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
|
||||
return await window.Store.Cmd.openChatBottom({'chat':chat});
|
||||
const chat = await window.WWebJS.getChat(chatId, {
|
||||
getAsModel: false,
|
||||
});
|
||||
return await window
|
||||
.require('WAWebCmd')
|
||||
.Cmd.openChatBottom({ chat: chat });
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
|
|
@ -56,9 +59,11 @@ class InterfaceController {
|
|||
* @param {string} chatId ID of the chat drawer that will be opened
|
||||
*/
|
||||
async openChatDrawer(chatId) {
|
||||
await this.pupPage.evaluate(async chatId => {
|
||||
let chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
|
||||
await window.Store.Cmd.openDrawerMid(chat);
|
||||
await this.pupPage.evaluate(async (chatId) => {
|
||||
let chat = await window.WWebJS.getChat(chatId, {
|
||||
getAsModel: false,
|
||||
});
|
||||
await window.require('WAWebCmd').Cmd.openDrawerMid(chat);
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
|
|
@ -67,9 +72,11 @@ class InterfaceController {
|
|||
* @param {string} chatId ID of the chat search that will be opened
|
||||
*/
|
||||
async openChatSearch(chatId) {
|
||||
await this.pupPage.evaluate(async chatId => {
|
||||
let chat = await window.WWebJS.getChat(chatId, { getAsModel: false });
|
||||
await window.Store.Cmd.chatSearch(chat);
|
||||
await this.pupPage.evaluate(async (chatId) => {
|
||||
let chat = await window.WWebJS.getChat(chatId, {
|
||||
getAsModel: false,
|
||||
});
|
||||
await window.require('WAWebCmd').Cmd.chatSearch(chat);
|
||||
}, chatId);
|
||||
}
|
||||
|
||||
|
|
@ -79,10 +86,24 @@ class InterfaceController {
|
|||
*/
|
||||
async openChatWindowAt(msgId) {
|
||||
await this.pupPage.evaluate(async (msgId) => {
|
||||
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
|
||||
const chat = window.Store.Chat.get(msg.id.remote) ?? await window.Store.Chat.find(msg.id.remote);
|
||||
const searchContext = await window.Store.SearchContext.getSearchContext(chat, msg.id);
|
||||
await window.Store.Cmd.openChatAt({ chat: chat, msgContext: searchContext });
|
||||
const msg =
|
||||
window.require('WAWebCollections').Msg.get(msgId) ||
|
||||
(
|
||||
await window
|
||||
.require('WAWebCollections')
|
||||
.Msg.getMessagesById([msgId])
|
||||
)?.messages?.[0];
|
||||
const chat =
|
||||
window.require('WAWebCollections').Chat.get(msg.id.remote) ??
|
||||
(await window
|
||||
.require('WAWebCollections')
|
||||
.Chat.find(msg.id.remote));
|
||||
const searchContext = await window
|
||||
.require('WAWebChatMessageSearch')
|
||||
.getSearchContext(chat, msg.id);
|
||||
await window
|
||||
.require('WAWebCmd')
|
||||
.Cmd.openChatAt({ chat: chat, msgContext: searchContext });
|
||||
}, msgId);
|
||||
}
|
||||
|
||||
|
|
@ -91,9 +112,15 @@ class InterfaceController {
|
|||
* @param {string} msgId ID of the message drawer that will be opened
|
||||
*/
|
||||
async openMessageDrawer(msgId) {
|
||||
await this.pupPage.evaluate(async msgId => {
|
||||
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
|
||||
await window.Store.Cmd.msgInfoDrawer(msg);
|
||||
await this.pupPage.evaluate(async (msgId) => {
|
||||
const msg =
|
||||
window.require('WAWebCollections').Msg.get(msgId) ||
|
||||
(
|
||||
await window
|
||||
.require('WAWebCollections')
|
||||
.Msg.getMessagesById([msgId])
|
||||
)?.messages?.[0];
|
||||
await window.require('WAWebCmd').Cmd.msgInfoDrawer(msg);
|
||||
}, msgId);
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +129,9 @@ class InterfaceController {
|
|||
*/
|
||||
async closeRightDrawer() {
|
||||
await this.pupPage.evaluate(async () => {
|
||||
await window.Store.DrawerManager.closeDrawerRight();
|
||||
await window
|
||||
.require('WAWebDrawerManager')
|
||||
.DrawerManager.closeDrawerRight();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -111,8 +140,11 @@ class InterfaceController {
|
|||
*/
|
||||
async getFeatures() {
|
||||
return await this.pupPage.evaluate(() => {
|
||||
if(!window.Store.Features) throw new Error('This version of Whatsapp Web does not support features');
|
||||
return window.Store.Features.F;
|
||||
if (!window.require('WAWebCollections').Features)
|
||||
throw new Error(
|
||||
'This version of Whatsapp Web does not support features',
|
||||
);
|
||||
return window.require('WAWebCollections').Features.F;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -122,8 +154,13 @@ class InterfaceController {
|
|||
*/
|
||||
async checkFeatureStatus(feature) {
|
||||
return await this.pupPage.evaluate((feature) => {
|
||||
if(!window.Store.Features) throw new Error('This version of Whatsapp Web does not support features');
|
||||
return window.Store.Features.supportsFeature(feature);
|
||||
if (!window.require('WAWebCollections').Features)
|
||||
throw new Error(
|
||||
'This version of Whatsapp Web does not support features',
|
||||
);
|
||||
return window
|
||||
.require('WAWebCollections')
|
||||
.Features.supportsFeature(feature);
|
||||
}, feature);
|
||||
}
|
||||
|
||||
|
|
@ -133,9 +170,14 @@ class InterfaceController {
|
|||
*/
|
||||
async enableFeatures(features) {
|
||||
await this.pupPage.evaluate((features) => {
|
||||
if(!window.Store.Features) throw new Error('This version of Whatsapp Web does not support features');
|
||||
if (!window.require('WAWebCollections').Features)
|
||||
throw new Error(
|
||||
'This version of Whatsapp Web does not support features',
|
||||
);
|
||||
for (const feature in features) {
|
||||
window.Store.Features.setFeature(features[feature], true);
|
||||
window
|
||||
.require('WAWebCollections')
|
||||
.Features.setFeature(features[feature], true);
|
||||
}
|
||||
}, features);
|
||||
}
|
||||
|
|
@ -146,9 +188,14 @@ class InterfaceController {
|
|||
*/
|
||||
async disableFeatures(features) {
|
||||
await this.pupPage.evaluate((features) => {
|
||||
if(!window.Store.Features) throw new Error('This version of Whatsapp Web does not support features');
|
||||
if (!window.require('WAWebCollections').Features)
|
||||
throw new Error(
|
||||
'This version of Whatsapp Web does not support features',
|
||||
);
|
||||
for (const feature in features) {
|
||||
window.Store.Features.setFeature(features[feature], false);
|
||||
window
|
||||
.require('WAWebCollections')
|
||||
.Features.setFeature(features[feature], false);
|
||||
}
|
||||
}, features);
|
||||
}
|
||||
|
|
@ -165,7 +212,7 @@ module.exports = InterfaceController;
|
|||
<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 January 30, 2026.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on April 24, 2026.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Reference in a new issue