From 36aa37f1ac94ee07368fc6e1e39cb568772c7af9 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Fri, 21 Oct 2022 00:12:02 -0400 Subject: [PATCH 001/139] fix: set ephemeral fields and get links from messages (#1752) * fix setting ephemeral fields * fix missing links method --- src/util/Injected.js | 11 ++++------- tests/client.js | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index b09b27e304..b1ae286ef1 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -51,6 +51,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.ConversationMsgs = window.mR.findModule('loadEarlierMsgs')[0]; window.Store.sendReactionToMsg = window.mR.findModule('sendReactionToMsg')[0].sendReactionToMsg; window.Store.createOrUpdateReactionsModule = window.mR.findModule('createOrUpdateReactions')[0]; + window.Store.EphemeralFields = window.mR.findModule('getEphemeralFields')[0]; window.Store.StickerTools = { ...window.mR.findModule('toWebpSticker')[0], ...window.mR.findModule('addWebpMetadata')[0] @@ -227,11 +228,7 @@ exports.LoadUtils = () => { const extraOptions = options.extraOptions || {}; delete options.extraOptions; - const ephemeralSettings = { - ephemeralDuration: chat.isEphemeralSettingOn() ? chat.getEphemeralSetting() : undefined, - ephemeralSettingTimestamp: chat.getEphemeralSettingTimestamp() || undefined, - disappearingModeInitiator: chat.getDisappearingModeInitiator() || undefined, - }; + const ephemeralFields = window.Store.EphemeralFields.getEphemeralFields(chat); const message = { ...options, @@ -245,7 +242,7 @@ exports.LoadUtils = () => { t: parseInt(new Date().getTime() / 1000), isNewMsg: true, type: 'chat', - ...ephemeralSettings, + ...ephemeralFields, ...locationOptions, ...attOptions, ...quotedMsgOptions, @@ -366,7 +363,7 @@ exports.LoadUtils = () => { msg.isEphemeral = message.isEphemeral; msg.isStatusV3 = message.isStatusV3; - msg.links = (message.getLinks()).map(link => ({ + msg.links = (message.getRawLinks()).map(link => ({ link: link.href, isSuspicious: Boolean(link.suspiciousCharacters && link.suspiciousCharacters.size) })); diff --git a/tests/client.js b/tests/client.js index 233590524c..55f5334c1c 100644 --- a/tests/client.js +++ b/tests/client.js @@ -313,6 +313,7 @@ describe('Client', function() { 'Conn', 'Contact', 'DownloadManager', + 'EphemeralFields', 'Features', 'GroupMetadata', 'GroupParticipants', From ab87fecfd993d8252da1dba55568a77744bd8b82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Oct 2022 00:22:56 -0400 Subject: [PATCH 002/139] Update supported WhatsApp Web version to v2.2240.7 (#1592) Co-authored-by: pedroslopez --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cda4a29e6f..89ff5e5430 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2224.8](https://img.shields.io/badge/WhatsApp_Web-2.2224.8-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2240.7](https://img.shields.io/badge/WhatsApp_Web-2.2240.7-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index 5454cae012..f3c915135d 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2224.8 \ No newline at end of file +2.2240.7 \ No newline at end of file From ef3eadc6e5e237316d4154f19a2f25eb5d2cf56f Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Fri, 21 Oct 2022 00:25:57 -0400 Subject: [PATCH 003/139] chore: mark version 1.18.0 --- docs/Base.html | 6 +- docs/BaseAuthStrategy.html | 6 +- docs/BusinessContact.html | 6 +- docs/Buttons.html | 6 +- docs/Call.html | 6 +- docs/Chat.html | 22 +- docs/Client.html | 182 +++++++++++- docs/Client.js.html | 105 ++++++- docs/ClientInfo.html | 6 +- docs/Contact.html | 6 +- docs/GroupChat.html | 22 +- docs/GroupNotification.html | 6 +- docs/InterfaceController.html | 6 +- docs/Label.html | 6 +- docs/LegacySessionAuth.html | 6 +- docs/List.html | 6 +- docs/LocalAuth.html | 6 +- docs/Location.html | 6 +- docs/Message.html | 10 +- docs/MessageMedia.html | 43 ++- docs/NoAuth.html | 6 +- docs/Order.html | 6 +- docs/PrivateChat.html | 22 +- docs/PrivateContact.html | 6 +- docs/Product.html | 6 +- docs/Reaction.html | 159 +++++++++++ docs/RemoteAuth.html | 163 +++++++++++ docs/Util.html | 6 +- docs/authStrategies_BaseAuthStrategy.js.html | 9 +- docs/authStrategies_LegacySessionAuth.js.html | 6 +- docs/authStrategies_LocalAuth.js.html | 6 +- docs/authStrategies_NoAuth.js.html | 6 +- docs/authStrategies_RemoteAuth.js.html | 258 ++++++++++++++++++ docs/global.html | 45 ++- docs/index.html | 158 +++++++++-- docs/scripts/jsdoc-toc.js | 2 +- docs/structures_Base.js.html | 6 +- docs/structures_BusinessContact.js.html | 6 +- docs/structures_Buttons.js.html | 6 +- docs/structures_Call.js.html | 6 +- docs/structures_Chat.js.html | 19 +- docs/structures_ClientInfo.js.html | 6 +- docs/structures_Contact.js.html | 6 +- docs/structures_GroupChat.js.html | 6 +- docs/structures_GroupNotification.js.html | 6 +- docs/structures_Label.js.html | 6 +- docs/structures_List.js.html | 6 +- docs/structures_Location.js.html | 6 +- docs/structures_Message.js.html | 23 +- docs/structures_MessageMedia.js.html | 24 +- docs/structures_Order.js.html | 6 +- docs/structures_Payment.js.html | 6 +- docs/structures_PrivateChat.js.html | 6 +- docs/structures_PrivateContact.js.html | 6 +- docs/structures_Product.js.html | 6 +- docs/structures_ProductMetadata.js.html | 6 +- docs/structures_Reaction.js.html | 122 +++++++++ docs/util_Constants.js.html | 13 +- docs/util_InterfaceController.js.html | 6 +- docs/util_Util.js.html | 6 +- package.json | 2 +- 61 files changed, 1433 insertions(+), 216 deletions(-) create mode 100644 docs/Reaction.html create mode 100644 docs/RemoteAuth.html create mode 100644 docs/authStrategies_RemoteAuth.js.html create mode 100644 docs/structures_Reaction.js.html diff --git a/docs/Base.html b/docs/Base.html index 146705d630..8d659f4e1c 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Base + whatsapp-web.js 1.18.0 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index eb1fd0d5fa..f3b466818a 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: BaseAuthStrategy + whatsapp-web.js 1.18.0 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 86a7d39824..f82c6eeeba 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: BusinessContact + whatsapp-web.js 1.18.0 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index a5269104e5..e5c7e30071 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Buttons + whatsapp-web.js 1.18.0 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index d6ecec6298..7c80fc9964 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Call + whatsapp-web.js 1.18.0 » Class: Call @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

webClientShouldHandle diff --git a/docs/Chat.html b/docs/Chat.html index a1f3a9a9d2..eebcf58145 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Chat + whatsapp-web.js 1.18.0 » Class: Chat @@ -15,7 +15,7 @@ @@ -271,7 +271,7 @@

Parameters

 

-

Options for searching messages. Right now only limit is supported.

+

Options for searching messages. Right now only limit and fromMe is supported.

Values in searchOptions have the following properties:

@@ -297,6 +297,20 @@

Parameters

The amount of messages to return. If no limit is specified, the available messages will be returned. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.

+ + + + + +
+

fromMe

+
+

Boolean

+
+

Yes

+
+

Return only messages from the bot number or vise versa. To get all messages, leave the option undefined.

+
@@ -483,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 599d86a97c..24b52a03c0 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Client + whatsapp-web.js 1.18.0 » Class: Client @@ -15,7 +15,7 @@ @@ -236,6 +236,9 @@

Events

message_create
+
message_reaction
+
+
message_revoke_everyone
@@ -2181,6 +2184,179 @@

Parameter

+

message_reaction

+

Emitted when a reaction is sent, received, updated or removed

+
+

Parameters

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

reaction

+
+

object

+
+

 

+
+

Values in reaction have the following properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

id

+
+

object

+
+

 

+
+

Reaction id

+
+

orphan

+
+

number

+
+

 

+
+

Orphan

+
+

orphanReason

+
+

string

+
+

 

+
+

Orphan reason

+

Value can be null.

+
+

timestamp

+
+

number

+
+

 

+
+

Timestamp

+
+

reaction

+
+

string

+
+

 

+
+

Reaction

+
+

read

+
+

boolean

+
+

 

+
+

Read

+
+

msgId

+
+

object

+
+

 

+
+

Parent message id

+
+

senderId

+
+

string

+
+

 

+
+

Sender id

+
+

ack

+
+

number

+
+

 

+
+

Ack

+

Value can be null.

+
+
+
+
+

message_revoke_everyone

Emitted when a message is deleted for everyone in the chat.

@@ -2310,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index 1e5b887f0b..c39799f968 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: Client.js + whatsapp-web.js 1.18.0 » Source: Client.js @@ -15,7 +15,7 @@ @@ -41,7 +41,7 @@

Source: Client.js

const { ExposeStore, LoadUtils } = require('./util/Injected'); const ChatFactory = require('./factories/ChatFactory'); const ContactFactory = require('./factories/ContactFactory'); -const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List} = require('./structures'); +const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List, Reaction } = require('./structures'); const LegacySessionAuth = require('./authStrategies/LegacySessionAuth'); const NoAuth = require('./authStrategies/NoAuth'); @@ -146,6 +146,52 @@

Source: Client.js

referer: 'https://whatsapp.com/' }); + await page.evaluate(`function getElementByXpath(path) { + return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + }`); + + let lastPercent = null, + lastPercentMessage = null; + + await page.exposeFunction('loadingScreen', async (percent, message) => { + if (lastPercent !== percent || lastPercentMessage !== message) { + this.emit(Events.LOADING_SCREEN, percent, message); + lastPercent = percent; + lastPercentMessage = message; + } + }); + + await page.evaluate( + async function (selectors) { + var observer = new MutationObserver(function () { + let progressBar = window.getElementByXpath( + selectors.PROGRESS + ); + let progressMessage = window.getElementByXpath( + selectors.PROGRESS_MESSAGE + ); + + if (progressBar) { + window.loadingScreen( + progressBar.value, + progressMessage.innerText + ); + } + }); + + observer.observe(document, { + attributes: true, + childList: true, + characterData: true, + subtree: true, + }); + }, + { + PROGRESS: '//*[@id=\'app\']/div/div/div[2]/progress', + PROGRESS_MESSAGE: '//*[@id=\'app\']/div/div/div[3]', + } + ); + const INTRO_IMG_SELECTOR = '[data-testid="intro-md-beta-logo-dark"], [data-testid="intro-md-beta-logo-light"], [data-asset-intro-image-light="true"], [data-asset-intro-image-dark="true"]'; const INTRO_QRCODE_SELECTOR = 'div[data-ref] canvas'; @@ -404,7 +450,7 @@

Source: Client.js

this.emit(Events.MEDIA_UPLOADED, message); }); - await page.exposeFunction('onAppStateChangedEvent', (state) => { + await page.exposeFunction('onAppStateChangedEvent', async (state) => { /** * Emitted when the connection state changes @@ -431,6 +477,7 @@

Source: Client.js

* @event Client#disconnected * @param {WAState|"NAVIGATION"} reason reason that caused the disconnect */ + await this.authStrategy.disconnect(); this.emit(Events.DISCONNECTED, state); this.destroy(); } @@ -470,6 +517,27 @@

Source: Client.js

this.emit(Events.INCOMING_CALL, cll); }); + await page.exposeFunction('onReaction', (reactions) => { + for (const reaction of reactions) { + /** + * Emitted when a reaction is sent, received, updated or removed + * @event Client#message_reaction + * @param {object} reaction + * @param {object} reaction.id - Reaction id + * @param {number} reaction.orphan - Orphan + * @param {?string} reaction.orphanReason - Orphan reason + * @param {number} reaction.timestamp - Timestamp + * @param {string} reaction.reaction - Reaction + * @param {boolean} reaction.read - Read + * @param {object} reaction.msgId - Parent message id + * @param {string} reaction.senderId - Sender id + * @param {?number} reaction.ack - Ack + */ + + this.emit(Events.MESSAGE_REACTION, new Reaction(this, reaction)); + } + }); + await page.evaluate(() => { 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)); }); @@ -489,6 +557,22 @@

Source: Client.js

} } }); + + { + const module = window.Store.createOrUpdateReactionsModule; + const ogMethod = module.createOrUpdateReactions; + module.createOrUpdateReactions = ((...args) => { + window.onReaction(args[0].map(reaction => { + const msgKey = window.Store.MsgKey.fromString(reaction.msgKey); + const parentMsgKey = window.Store.MsgKey.fromString(reaction.parentMsgKey); + const timestamp = reaction.timestamp / 1000; + + return {...reaction, msgKey, parentMsgKey, timestamp }; + })); + + return ogMethod(...args); + }).bind(module); + } }); /** @@ -496,11 +580,13 @@

Source: Client.js

* @event Client#ready */ this.emit(Events.READY); + this.authStrategy.afterAuthReady(); // Disconnect when navigating away when in PAIRING state (detect logout) this.pupPage.on('framenavigated', async () => { const appState = await this.getState(); if(!appState || appState === WAState.PAIRING) { + await this.authStrategy.disconnect(); this.emit(Events.DISCONNECTED, 'NAVIGATION'); await this.destroy(); } @@ -512,6 +598,7 @@

Source: Client.js

*/ async destroy() { await this.pupBrowser.close(); + await this.authStrategy.destroy(); } /** @@ -933,7 +1020,13 @@

Source: Client.js

*/ async getCommonGroups(contactId) { const commonGroups = await this.pupPage.evaluate(async (contactId) => { - const contact = window.Store.Contact.get(contactId); + let contact = window.Store.Contact.get(contactId); + if (!contact) { + const wid = window.Store.WidFactory.createUserWid(contactId); + const chatConstructor = window.Store.Contact.getModelsArray().find(c=>!c.isGroup).constructor; + contact = new chatConstructor({id: wid}); + } + if (contact.commonGroups) { return contact.commonGroups.serialize(); } @@ -1131,7 +1224,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 0bb31af40a..064991c852 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: ClientInfo + whatsapp-web.js 1.18.0 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index 5988ce31f1..4594061a25 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Contact + whatsapp-web.js 1.18.0 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index a54f8dfe8f..a39e454138 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: GroupChat + whatsapp-web.js 1.18.0 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -436,7 +436,7 @@

Parameters

 

-

Options for searching messages. Right now only limit is supported.

+

Options for searching messages. Right now only limit and fromMe is supported.

Values in searchOptions have the following properties:

@@ -462,6 +462,20 @@

Parameters

The amount of messages to return. If no limit is specified, the available messages will be returned. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.

+ + + + + +
+

fromMe

+
+

 

+
+

Yes

+
+

Return only messages from the bot number or vise versa. To get all messages, leave the option undefined.

+
@@ -927,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 64aeb49bcc..eb9ce7ce5a 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: GroupNotification + whatsapp-web.js 1.18.0 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 5776e72744..707aee24fb 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: InterfaceController + whatsapp-web.js 1.18.0 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index e678cd74dd..ab642e9ca1 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Label + whatsapp-web.js 1.18.0 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 5455ef32ac..cc1aedbd70 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: LegacySessionAuth + whatsapp-web.js 1.18.0 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index 953b5dcb88..dce13cfe81 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: List + whatsapp-web.js 1.18.0 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 96ec06c6ab..dbf9ed26eb 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: LocalAuth + whatsapp-web.js 1.18.0 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index a41e833983..cfb20a0ec1 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Location + whatsapp-web.js 1.18.0 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index 95fb491fe0..04e7b38d28 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Message + whatsapp-web.js 1.18.0 » Class: Message @@ -15,7 +15,7 @@ @@ -400,7 +400,7 @@

Parameter

 

-

If true and the message is sent by the current user, will delete it for everyone in the chat.

+

If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat.

Value can be null.

@@ -420,7 +420,7 @@

downloadMedia
async

forward(chat) → Promise

-

Forwards this message to another chat

+

Forwards this message to another chat (that you chatted before, otherwise it will fail)

Parameter

@@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index c2857b5074..1dc5e9abac 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: MessageMedia + whatsapp-web.js 1.18.0 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -26,7 +26,7 @@

@@ -135,7 +136,22 @@

Parameters

 

+ + + + + + @@ -155,7 +171,12 @@

data

filename  nullable string

-

Name of the file (for documents)

+

Document file name. Value can be null

+
+
+

filesize +  nullable number

+

Document file size in bytes. Value can be null

mimetype @@ -343,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 8ff57ef73c..688a6ac324 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: NoAuth + whatsapp-web.js 1.18.0 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index dde65eebbb..1cdda968a6 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Order + whatsapp-web.js 1.18.0 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 3203df9015..1922966a11 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: PrivateChat + whatsapp-web.js 1.18.0 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -295,7 +295,7 @@

Parameters

 

@@ -519,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 35d012f692..b5257e03ef 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: PrivateContact + whatsapp-web.js 1.18.0 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 746dd69623..3f595d3be0 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Product + whatsapp-web.js 1.18.0 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html new file mode 100644 index 0000000000..b291413302 --- /dev/null +++ b/docs/Reaction.html @@ -0,0 +1,159 @@ + + + + + + + whatsapp-web.js 1.18.0 » Class: Reaction + + + + + + + + +
+
+
+
+ +
+
+

Properties

+
+
+
+
ack
+
+
+
id
+
+
+
msgId
+
+
+
+
+
+
+
orphan
+
+
+
orphanReason
+
+
+
reaction
+
+
+
+
+
+
+
read
+
+
+
senderId
+
+
+
timestamp
+
+
+
+
+
+
+
+
+

new Reaction()

+
+
Extends
+
Base
+
+
+
+

Properties

+
+

ack +  nullable number

+

ACK

+
+
+

id +  object

+

Reaction ID

+
+
+

msgId +  object

+

Message ID

+
+
+

orphan +  number

+

Orphan

+
+
+

orphanReason +  nullable string

+

Orphan reason

+
+
+

reaction +  string

+

Reaction

+
+
+

read +  boolean

+

Read

+
+
+

senderId +  string

+

Sender ID

+
+
+

timestamp +  number

+

Unix timestamp for when the reaction was created

+
+
+
+
+
+
+ +
+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html new file mode 100644 index 0000000000..9a028bc72d --- /dev/null +++ b/docs/RemoteAuth.html @@ -0,0 +1,163 @@ + + + + + + + whatsapp-web.js 1.18.0 » Class: RemoteAuth + + + + + + + + +
+
+
+
+ +
+
+
+

new RemoteAuth(options)

+
+

Parameters

+

-

Document file name

+

Document file name. Value can be null

+

Value can be null.

+
+

filesize

+
+

 

+
+

 

+
+

Document file size in bytes. Value can be null

Value can be null.

-

Options for searching messages. Right now only limit is supported.

+

Options for searching messages. Right now only limit and fromMe is supported.

Values in searchOptions have the following properties:

@@ -321,6 +321,20 @@

Parameters

The amount of messages to return. If no limit is specified, the available messages will be returned. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.

+ + + + + +
+

fromMe

+
+

 

+
+

Yes

+
+

Return only messages from the bot number or vise versa. To get all messages, leave the option undefined.

+
+ + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

options

+
+

 

+
+

 

+
+

options

+

Values in options have the following properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

store

+
+

 

+
+

 

+
+

Remote database store instance

+
+

clientId

+
+

 

+
+

 

+
+

Client id to distinguish instances if you are using multiple, otherwise keep null if you are using only one instance

+
+

dataPath

+
+

 

+
+

 

+
+

Change the default path for saving session files, default is: "./.wwebjs_auth/"

+
+

backupSyncIntervalMs

+
+

 

+
+

 

+
+

Sets the time interval for periodic session backups. Accepts values starting from 60000ms {1 minute}

+
+
+
+
+
+

+
+
+ + + + + +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/docs/Util.html b/docs/Util.html index b64b60624f..86ed99c6b3 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Class: Util + whatsapp-web.js 1.18.0 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 2bbcd7ffb4..0912654e36 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.18.0 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -49,6 +49,9 @@

Source: authStrategies/BaseAuthStrategy.js

}; } async getAuthEventPayload() {} + async afterAuthReady() {} + async disconnect() {} + async destroy() {} async logout() {} } @@ -62,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 6167ba9a39..344cfbfa5a 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.18.0 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index ac7832cf9c..83cf47b3ee 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.18.0 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 50349b0f93..f6ee7a454d 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.18.0 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html new file mode 100644 index 0000000000..63709bd2d4 --- /dev/null +++ b/docs/authStrategies_RemoteAuth.js.html @@ -0,0 +1,258 @@ + + + + + + + whatsapp-web.js 1.18.0 » Source: authStrategies/RemoteAuth.js + + + + + + + + +
+
+
+ +
+ +
+
'use strict';
+
+/* Require Optional Dependencies */
+try {
+    var fs = require('fs-extra');
+    var unzipper = require('unzipper');
+    var archiver = require('archiver');
+} catch {
+    fs = undefined;
+    unzipper = undefined;
+    archiver = undefined;
+}
+
+const path = require('path');
+const { Events } = require('./../util/Constants');
+const BaseAuthStrategy = require('./BaseAuthStrategy');
+
+/**
+ * Remote-based authentication
+ * @param {object} options - options
+ * @param {object} options.store - Remote database store instance
+ * @param {string} options.clientId - Client id to distinguish instances if you are using multiple, otherwise keep null if you are using only one instance
+ * @param {string} options.dataPath - Change the default path for saving session files, default is: "./.wwebjs_auth/" 
+ * @param {number} options.backupSyncIntervalMs - Sets the time interval for periodic session backups. Accepts values starting from 60000ms {1 minute}
+ */
+class RemoteAuth extends BaseAuthStrategy {
+    constructor({ clientId, dataPath, store, backupSyncIntervalMs } = {}) {
+        if (!fs &amp;&amp; !unzipper &amp;&amp; !archiver) throw new Error('Optional Dependencies [fs-extra, unzipper, archiver] are required to use RemoteAuth. Make sure to run npm install correctly and remove the --no-optional flag');
+        super();
+
+        const idRegex = /^[-_\w]+$/i;
+        if (clientId &amp;&amp; !idRegex.test(clientId)) {
+            throw new Error('Invalid clientId. Only alphanumeric characters, underscores and hyphens are allowed.');
+        }
+        if (!backupSyncIntervalMs || backupSyncIntervalMs &lt; 60000) {
+            throw new Error('Invalid backupSyncIntervalMs. Accepts values starting from 60000ms {1 minute}.');
+        }
+        if(!store) throw new Error('Remote database store is required.');
+
+        this.store = store;
+        this.clientId = clientId;
+        this.backupSyncIntervalMs = backupSyncIntervalMs;
+        this.dataPath = path.resolve(dataPath || './.wwebjs_auth/');
+        this.tempDir = `${this.dataPath}/wwebjs_temp_session`;
+        this.requiredDirs = ['Default', 'IndexedDB', 'Local Storage']; /* => Required Files &amp; Dirs in WWebJS to restore session */
+    }
+
+    async beforeBrowserInitialized() {
+        const puppeteerOpts = this.client.options.puppeteer;
+        const sessionDirName = this.clientId ? `RemoteAuth-${this.clientId}` : 'RemoteAuth';
+        const dirPath = path.join(this.dataPath, sessionDirName);
+
+        if (puppeteerOpts.userDataDir &amp;&amp; puppeteerOpts.userDataDir !== dirPath) {
+            throw new Error('RemoteAuth is not compatible with a user-supplied userDataDir.');
+        }
+
+        this.userDataDir = dirPath;
+        this.sessionName = sessionDirName;
+
+        await this.extractRemoteSession();
+
+        this.client.options.puppeteer = {
+            ...puppeteerOpts,
+            userDataDir: dirPath
+        };
+    }
+
+    async logout() {
+        await this.disconnect();
+    }
+
+    async destroy() {
+        clearInterval(this.backupSync);
+    }
+
+    async disconnect() {
+        await this.deleteRemoteSession();
+
+        let pathExists = await this.isValidPath(this.userDataDir);
+        if (pathExists) {
+            await fs.promises.rm(this.userDataDir, {
+                recursive: true,
+                force: true
+            }).catch(() => {});
+        }
+        clearInterval(this.backupSync);
+    }
+
+    async afterAuthReady() {
+        const sessionExists = await this.store.sessionExists({session: this.sessionName});
+        if(!sessionExists) {
+            await this.delay(60000); /* Initial delay sync required for session to be stable enough to recover */
+            await this.storeRemoteSession({emit: true});
+        }
+        var self = this;
+        this.backupSync = setInterval(async function () {
+            await self.storeRemoteSession();
+        }, this.backupSyncIntervalMs);
+    }
+
+    async storeRemoteSession(options) {
+        /* Compress &amp; Store Session */
+        const pathExists = await this.isValidPath(this.userDataDir);
+        if (pathExists) {
+            await this.compressSession();
+            await this.store.save({session: this.sessionName});
+            await fs.promises.unlink(`${this.sessionName}.zip`);
+            await fs.promises.rm(`${this.tempDir}`, {
+                recursive: true,
+                force: true
+            }).catch(() => {});
+            if(options &amp;&amp; options.emit) this.client.emit(Events.REMOTE_SESSION_SAVED);
+        }
+    }
+
+    async extractRemoteSession() {
+        const pathExists = await this.isValidPath(this.userDataDir);
+        const compressedSessionPath = `${this.sessionName}.zip`;
+        const sessionExists = await this.store.sessionExists({session: this.sessionName});
+        if (pathExists) {
+            await fs.promises.rm(this.userDataDir, {
+                recursive: true,
+                force: true
+            }).catch(() => {});
+        }
+        if (sessionExists) {
+            await this.store.extract({session: this.sessionName, path: compressedSessionPath});
+            await this.unCompressSession(compressedSessionPath);
+        } else {
+            fs.mkdirSync(this.userDataDir, { recursive: true });
+        }
+    }
+
+    async deleteRemoteSession() {
+        const sessionExists = await this.store.sessionExists({session: this.sessionName});
+        if (sessionExists) await this.store.delete({session: this.sessionName});
+    }
+
+    async compressSession() {
+        const archive = archiver('zip');
+        const stream = fs.createWriteStream(`${this.sessionName}.zip`);
+
+        await fs.copy(this.userDataDir, this.tempDir).catch(() => {});
+        await this.deleteMetadata();
+        return new Promise((resolve, reject) => {
+            archive
+                .directory(this.tempDir, false)
+                .on('error', err => reject(err))
+                .pipe(stream);
+
+            stream.on('close', () => resolve());
+            archive.finalize();
+        });
+    }
+
+    async unCompressSession(compressedSessionPath) {
+        var stream = fs.createReadStream(compressedSessionPath);
+        await new Promise((resolve, reject) => {
+            stream.pipe(unzipper.Extract({
+                path: this.userDataDir
+            }))
+                .on('error', err => reject(err))
+                .on('finish', () => resolve());
+        });
+        await fs.promises.unlink(compressedSessionPath);
+    }
+
+    async deleteMetadata() {
+        const sessionDirs = [this.tempDir, path.join(this.tempDir, 'Default')];
+        for (const dir of sessionDirs) {
+            const sessionFiles = await fs.promises.readdir(dir);
+            for (const element of sessionFiles) {
+                if (!this.requiredDirs.includes(element)) {
+                    const dirElement = path.join(dir, element);
+                    const stats = await fs.promises.lstat(dirElement);
+    
+                    if (stats.isDirectory()) {
+                        await fs.promises.rm(dirElement, {
+                            recursive: true,
+                            force: true
+                        }).catch(() => {});
+                    } else {
+                        await fs.promises.unlink(dirElement).catch(() => {});
+                    }
+                }
+            }
+        }
+    }
+
+    async isValidPath(path) {
+        try {
+            await fs.promises.access(path);
+            return true;
+        } catch {
+            return false;
+        }
+    }
+
+    async delay(ms) {
+        return new Promise(resolve => setTimeout(resolve, ms));
+    }
+}
+
+module.exports = RemoteAuth;
+
+
+
+
+ +
+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/docs/global.html b/docs/global.html index d20b79b05f..89c6ad9c00 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Globals + whatsapp-web.js 1.18.0 » Globals @@ -15,7 +15,7 @@ @@ -285,6 +285,19 @@

Properties

+ + +

MESSAGE_REACTION

+ + +

 

+ + +

 

+ + + +

MEDIA_UPLOADED

@@ -350,6 +363,19 @@

Properties

+ + +

LOADING_SCREEN

+ + +

 

+ + +

 

+ + + +

DISCONNECTED

@@ -402,6 +428,19 @@

Properties

+ + +

REMOTE_SESSION_SAVED

+ + +

 

+ + +

 

+ + + + @@ -1980,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index caff23885a..3e2c8fd2f8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Home + whatsapp-web.js 1.18.0 » Home @@ -15,7 +15,7 @@ @@ -27,11 +27,11 @@
+
+ Client#event:message_revoke_everyone +
+
+
Client#event:message_revoke_me
@@ -911,15 +916,15 @@

Client

+
+
+ -
-
Client#info
@@ -1234,17 +1239,22 @@

Events

+
+ Events.GROUP_UPDATE +
+
+
+
+
+

Reaction

+
+
+
+
+ Reaction() +
+
+
+
+ Reaction#ack +
+
+
+
+ Reaction#id +
+
+
+
+ Reaction#msgId +
+
+
+
+
+
+
+
+ Reaction#orphan +
+
+
+
+ Reaction#orphanReason +
+
+
+
+ Reaction#reaction +
+
+
+
+ Reaction#read +
+
+
+
+
+
+
+
+ Reaction#senderId +
+
+
+
+ Reaction#timestamp +
+
+
+
+
+
+
+
+
+
+

RemoteAuth

+
+
+
+
+ RemoteAuth(options) +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Status

@@ -3158,7 +3276,7 @@

WAState

diff --git a/docs/scripts/jsdoc-toc.js b/docs/scripts/jsdoc-toc.js index 62e7e8f478..f910b0116b 100644 --- a/docs/scripts/jsdoc-toc.js +++ b/docs/scripts/jsdoc-toc.js @@ -6,7 +6,7 @@ treeNode.tree({ autoEscape: false, closedIcon: '⇢', - data: [{"label":"Globals","id":"global","children":[]},{"label":"Base","id":"Base","children":[]},{"label":"BaseAuthStrategy","id":"BaseAuthStrategy","children":[]},{"label":"BusinessContact","id":"BusinessContact","children":[]},{"label":"Buttons","id":"Buttons","children":[]},{"label":"Call","id":"Call","children":[]},{"label":"Chat","id":"Chat","children":[]},{"label":"Client","id":"Client","children":[]},{"label":"ClientInfo","id":"ClientInfo","children":[]},{"label":"Contact","id":"Contact","children":[]},{"label":"GroupChat","id":"GroupChat","children":[]},{"label":"GroupNotification","id":"GroupNotification","children":[]},{"label":"InterfaceController","id":"InterfaceController","children":[]},{"label":"Label","id":"Label","children":[]},{"label":"LegacySessionAuth","id":"LegacySessionAuth","children":[]},{"label":"List","id":"List","children":[]},{"label":"LocalAuth","id":"LocalAuth","children":[]},{"label":"Location","id":"Location","children":[]},{"label":"Message","id":"Message","children":[]},{"label":"MessageMedia","id":"MessageMedia","children":[]},{"label":"NoAuth","id":"NoAuth","children":[]},{"label":"Order","id":"Order","children":[]},{"label":"PrivateChat","id":"PrivateChat","children":[]},{"label":"PrivateContact","id":"PrivateContact","children":[]},{"label":"Product","id":"Product","children":[]},{"label":"Util","id":"Util","children":[]}], + data: [{"label":"Globals","id":"global","children":[]},{"label":"Base","id":"Base","children":[]},{"label":"BaseAuthStrategy","id":"BaseAuthStrategy","children":[]},{"label":"BusinessContact","id":"BusinessContact","children":[]},{"label":"Buttons","id":"Buttons","children":[]},{"label":"Call","id":"Call","children":[]},{"label":"Chat","id":"Chat","children":[]},{"label":"Client","id":"Client","children":[]},{"label":"ClientInfo","id":"ClientInfo","children":[]},{"label":"Contact","id":"Contact","children":[]},{"label":"GroupChat","id":"GroupChat","children":[]},{"label":"GroupNotification","id":"GroupNotification","children":[]},{"label":"InterfaceController","id":"InterfaceController","children":[]},{"label":"Label","id":"Label","children":[]},{"label":"LegacySessionAuth","id":"LegacySessionAuth","children":[]},{"label":"List","id":"List","children":[]},{"label":"LocalAuth","id":"LocalAuth","children":[]},{"label":"Location","id":"Location","children":[]},{"label":"Message","id":"Message","children":[]},{"label":"MessageMedia","id":"MessageMedia","children":[]},{"label":"NoAuth","id":"NoAuth","children":[]},{"label":"Order","id":"Order","children":[]},{"label":"PrivateChat","id":"PrivateChat","children":[]},{"label":"PrivateContact","id":"PrivateContact","children":[]},{"label":"Product","id":"Product","children":[]},{"label":"Reaction","id":"Reaction","children":[]},{"label":"RemoteAuth","id":"RemoteAuth","children":[]},{"label":"Util","id":"Util","children":[]}], openedIcon: ' ⇣', saveState: false, useContextMenu: false diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index b62302b36f..65d6ae73d4 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Base.js + whatsapp-web.js 1.18.0 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 1569c3322b..c6740cb2ad 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/BusinessContact.js + whatsapp-web.js 1.18.0 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index f11871752d..8be1944da6 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Buttons.js + whatsapp-web.js 1.18.0 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index cfe7007a70..81cb49b1eb 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Call.js + whatsapp-web.js 1.18.0 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 09d1986a1c..5521da6561 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Chat.js + whatsapp-web.js 1.18.0 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -201,13 +201,22 @@

Source: structures/Chat.js

/** * Loads chat messages, sorted from earliest to latest. - * @param {Object} searchOptions Options for searching messages. Right now only limit is supported. + * @param {Object} searchOptions Options for searching messages. Right now only limit and fromMe is supported. * @param {Number} [searchOptions.limit] The amount of messages to return. If no limit is specified, the available messages will be returned. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages. + * @param {Boolean} [searchOptions.fromMe] Return only messages from the bot number or vise versa. To get all messages, leave the option undefined. * @returns {Promise&lt;Array&lt;Message>>} */ async fetchMessages(searchOptions) { let messages = await this.client.pupPage.evaluate(async (chatId, searchOptions) => { - const msgFilter = m => !m.isNotification; // dont include notification messages + const msgFilter = (m) => { + if (m.isNotification) { + return false; // dont include notification messages + } + if (searchOptions &amp;&amp; searchOptions.fromMe &amp;&amp; m.id.fromMe !== searchOptions.fromMe) { + return false; + } + return true; + }; const chat = window.Store.Chat.get(chatId); let msgs = chat.msgs.getModelsArray().filter(msgFilter); @@ -290,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index fe6a725325..f591d3d37e 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/ClientInfo.js + whatsapp-web.js 1.18.0 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 1344f74dcf..9280f8010f 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Contact.js + whatsapp-web.js 1.18.0 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index c0d97defc7..a3043e0c47 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/GroupChat.js + whatsapp-web.js 1.18.0 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -272,7 +272,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 943eb50c61..dcc45b4b91 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/GroupNotification.js + whatsapp-web.js 1.18.0 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 1a28b122a0..8edcac81e3 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Label.js + whatsapp-web.js 1.18.0 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 5f66e7af0b..85ada9e7ef 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/List.js + whatsapp-web.js 1.18.0 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 1dfb302f4b..788874f81b 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Location.js + whatsapp-web.js 1.18.0 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index d937dd51e2..193ada00ee 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Message.js + whatsapp-web.js 1.18.0 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -373,6 +373,8 @@

Source: structures/Message.js

*/ async react(reaction){ await this.client.pupPage.evaluate(async (messageId, reaction) => { + if (!messageId) { return undefined; } + const msg = await window.Store.Msg.get(messageId); await window.Store.sendReactionToMsg(msg, reaction); }, this.id._serialized, reaction); @@ -387,7 +389,7 @@

Source: structures/Message.js

} /** - * Forwards this message to another chat + * Forwards this message to another chat (that you chatted before, otherwise it will fail) * * @param {string|Chat} chat Chat model or chat ID to which the message will be forwarded * @returns {Promise} @@ -439,12 +441,13 @@

Source: structures/Message.js

signal: (new AbortController).signal }); - const data = window.WWebJS.arrayBufferToBase64(decryptedMedia); + const data = await window.WWebJS.arrayBufferToBase64Async(decryptedMedia); return { data, mimetype: msg.mimetype, - filename: msg.filename + filename: msg.filename, + filesize: msg.size }; } catch (e) { if(e.status &amp;&amp; e.status === 404) return undefined; @@ -453,19 +456,19 @@

Source: structures/Message.js

}, this.id._serialized); if (!result) return undefined; - return new MessageMedia(result.mimetype, result.data, result.filename); + return new MessageMedia(result.mimetype, result.data, result.filename, result.filesize); } /** * Deletes a message from the chat - * @param {?boolean} everyone If true and the message is sent by the current user, will delete it for everyone in the chat. + * @param {?boolean} everyone If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat. */ async delete(everyone) { await this.client.pupPage.evaluate((msgId, everyone) => { let msg = window.Store.Msg.get(msgId); - if (everyone &amp;&amp; msg.id.fromMe &amp;&amp; msg._canRevoke()) { - return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], {type: 'Sender'}); + if (everyone &amp;&amp; msg._canRevoke()) { + return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], { type: msg.id.fromMe ? 'Sender' : 'Admin' }); } return window.Store.Cmd.sendDeleteMsgs(msg.chat, [msg], true); @@ -566,7 +569,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index f1886fa596..07dc863030 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/MessageMedia.js + whatsapp-web.js 1.18.0 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -41,10 +41,11 @@

Source: structures/MessageMedia.js

* Media attached to a message * @param {string} mimetype MIME type of the attachment * @param {string} data Base64-encoded data of the file - * @param {?string} filename Document file name + * @param {?string} filename Document file name. Value can be null + * @param {?number} filesize Document file size in bytes. Value can be null */ class MessageMedia { - constructor(mimetype, data, filename) { + constructor(mimetype, data, filename, filesize) { /** * MIME type of the attachment * @type {string} @@ -58,10 +59,16 @@

Source: structures/MessageMedia.js

this.data = data; /** - * Name of the file (for documents) + * Document file name. Value can be null * @type {?string} */ this.filename = filename; + + /** + * Document file size in bytes. Value can be null + * @type {?number} + */ + this.filesize = filesize; } /** @@ -99,6 +106,7 @@

Source: structures/MessageMedia.js

const reqOptions = Object.assign({ headers: { accept: 'image/* video/* text/* audio/*' } }, options); const response = await fetch(url, reqOptions); const mime = response.headers.get('Content-Type'); + const size = response.headers.get('Content-Length'); const contentDisposition = response.headers.get('Content-Disposition'); const name = contentDisposition ? contentDisposition.match(/((?&lt;=filename=")(.*)(?="))/) : null; @@ -114,7 +122,7 @@

Source: structures/MessageMedia.js

data = btoa(data); } - return { data, mime, name }; + return { data, mime, name, size }; } const res = options.client @@ -127,7 +135,7 @@

Source: structures/MessageMedia.js

if (!mimetype) mimetype = res.mime; - return new MessageMedia(mimetype, res.data, filename); + return new MessageMedia(mimetype, res.data, filename, res.size || null); } } @@ -142,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 26461b3ab3..e2b2716a82 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Order.js + whatsapp-web.js 1.18.0 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 8e74292ae0..bb84d740bc 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Payment.js + whatsapp-web.js 1.18.0 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 3f32888a7d..100c40388b 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/PrivateChat.js + whatsapp-web.js 1.18.0 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 40706a43f5..ebea085ac4 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/PrivateContact.js + whatsapp-web.js 1.18.0 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 0c77d311ad..7fccd8ae0b 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/Product.js + whatsapp-web.js 1.18.0 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index 220bef0210..62e786bd0d 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.18.0 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html new file mode 100644 index 0000000000..bcdc65e4be --- /dev/null +++ b/docs/structures_Reaction.js.html @@ -0,0 +1,122 @@ + + + + + + + whatsapp-web.js 1.18.0 » Source: structures/Reaction.js + + + + + + + + +
+
+
+ +
+ +
+
'use strict';
+
+const Base = require('./Base');
+
+/**
+ * Represents a Reaction on WhatsApp
+ * @extends {Base}
+ */
+class Reaction extends Base {
+    constructor(client, data) {
+        super(client);
+
+        if (data) this._patch(data);
+    }
+
+    _patch(data) {
+        /**
+         * Reaction ID
+         * @type {object}
+         */
+        this.id = data.msgKey;
+        /**
+         * Orphan
+         * @type {number}
+         */
+        this.orphan = data.orphan;
+        /**
+         * Orphan reason
+         * @type {?string}
+         */
+        this.orphanReason = data.orphanReason;
+        /**
+         * Unix timestamp for when the reaction was created
+         * @type {number}
+         */
+        this.timestamp = data.timestamp;
+        /**
+         * Reaction
+         * @type {string}
+         */
+        this.reaction = data.reactionText;
+        /**
+         * Read
+         * @type {boolean}
+         */
+        this.read = data.read;
+        /**
+         * Message ID
+         * @type {object}
+         */
+        this.msgId = data.parentMsgKey;
+        /**
+         * Sender ID
+         * @type {string}
+         */
+        this.senderId = data.senderUserJid;
+        /**
+         * ACK
+         * @type {?number}
+         */
+        this.ack = data.ack;
+        
+        
+        return super._patch(data);
+    }
+    
+}
+
+module.exports = Reaction;
+
+
+
+ +
+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index ab0edca504..84a5d6f31a 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: util/Constants.js + whatsapp-web.js 1.18.0 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -42,7 +42,7 @@

Source: util/Constants.js

qrMaxRetries: 0, takeoverOnConflict: false, takeoverTimeoutMs: 0, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36', + userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', ffmpegPath: 'ffmpeg', bypassCSP: false }; @@ -72,15 +72,18 @@

Source: util/Constants.js

MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone', MESSAGE_REVOKED_ME: 'message_revoke_me', MESSAGE_ACK: 'message_ack', + MESSAGE_REACTION: 'message_reaction', MEDIA_UPLOADED: 'media_uploaded', GROUP_JOIN: 'group_join', GROUP_LEAVE: 'group_leave', GROUP_UPDATE: 'group_update', QR_RECEIVED: 'qr', + LOADING_SCREEN: 'loading_screen', DISCONNECTED: 'disconnected', STATE_CHANGED: 'change_state', BATTERY_CHANGED: 'change_battery', - INCOMING_CALL: 'incoming_call' + INCOMING_CALL: 'incoming_call', + REMOTE_SESSION_SAVED: 'remote_session_saved' }; /** @@ -197,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 0cdbf70afe..a036bd64f7 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: util/InterfaceController.js + whatsapp-web.js 1.18.0 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -160,7 +160,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index 50b56d03aa..6906bf1a81 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.17.1 » Source: util/Util.js + whatsapp-web.js 1.18.0 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index 46ce3391c9..e7e47ae163 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.0-alpha.1", + "version": "1.18.0", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 088ec32b7bedae76f4e1b9fea06ed6a09cacc477 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Wed, 26 Oct 2022 22:43:19 -0400 Subject: [PATCH 004/139] Support for WhatsApp Web 2.2241.6 (#1762) * proposed fix * Fixes * Add condition for older versions of WA * fix for old node version support * fix: default to mdbackend = true Co-authored-by: purpshell --- src/util/Injected.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index b1ae286ef1..4184de8665 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -13,7 +13,6 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.Cmd = window.mR.findModule('Cmd')[0].Cmd; window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0]; window.Store.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager; - window.Store.MDBackend = window.mR.findModule('isMDBackend')[0].isMDBackend(); window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].LegacyPhoneFeatures; window.Store.GroupMetadata = window.mR.findModule((module) => module.default && module.default.handlePendingInvite)[0].default; window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0]; @@ -39,7 +38,6 @@ exports.ExposeStore = (moduleRaidStr) => { 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.VCard = window.mR.findModule('vcardFromContactModel')[0]; - window.Store.Wap = window.mR.findModule('queryLinkPreview')[0].default; window.Store.WidFactory = window.mR.findModule('createWid')[0]; window.Store.ProfilePic = window.mR.findModule('profilePicResync')[0]; window.Store.PresenceUtils = window.mR.findModule('sendPresenceAvailable')[0]; @@ -71,6 +69,19 @@ exports.ExposeStore = (moduleRaidStr) => { }); }; } + + // TODO remove these once everybody has been updated to WWebJS with legacy sessions removed + const _linkPreview = window.mR.findModule('queryLinkPreview'); + if (_linkPreview && _linkPreview[0] && _linkPreview[0].default) { + window.Store.Wap = _linkPreview[0].default; + } + + const _isMDBackend = window.mR.findModule('isMDBackend'); + if(_isMDBackend && _isMDBackend[0] && _isMDBackend[0].isMDBackend) { + window.Store.MDBackend = _isMDBackend[0].isMDBackend(); + } else { + window.Store.MDBackend = true; + } }; exports.LoadUtils = () => { From 7d672078cd6370001134bc19d09386344cba9c29 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Wed, 26 Oct 2022 22:44:05 -0400 Subject: [PATCH 005/139] chore: mark version v1.18.1 --- docs/Base.html | 6 +++--- docs/BaseAuthStrategy.html | 6 +++--- docs/BusinessContact.html | 6 +++--- docs/Buttons.html | 6 +++--- docs/Call.html | 6 +++--- docs/Chat.html | 6 +++--- docs/Client.html | 6 +++--- docs/Client.js.html | 6 +++--- docs/ClientInfo.html | 6 +++--- docs/Contact.html | 6 +++--- docs/GroupChat.html | 6 +++--- docs/GroupNotification.html | 6 +++--- docs/InterfaceController.html | 6 +++--- docs/Label.html | 6 +++--- docs/LegacySessionAuth.html | 6 +++--- docs/List.html | 6 +++--- docs/LocalAuth.html | 6 +++--- docs/Location.html | 6 +++--- docs/Message.html | 6 +++--- docs/MessageMedia.html | 6 +++--- docs/NoAuth.html | 6 +++--- docs/Order.html | 6 +++--- docs/PrivateChat.html | 6 +++--- docs/PrivateContact.html | 6 +++--- docs/Product.html | 6 +++--- docs/Reaction.html | 6 +++--- docs/RemoteAuth.html | 6 +++--- docs/Util.html | 6 +++--- docs/authStrategies_BaseAuthStrategy.js.html | 6 +++--- docs/authStrategies_LegacySessionAuth.js.html | 6 +++--- docs/authStrategies_LocalAuth.js.html | 6 +++--- docs/authStrategies_NoAuth.js.html | 6 +++--- docs/authStrategies_RemoteAuth.js.html | 6 +++--- docs/global.html | 6 +++--- docs/index.html | 8 ++++---- docs/structures_Base.js.html | 6 +++--- docs/structures_BusinessContact.js.html | 6 +++--- docs/structures_Buttons.js.html | 6 +++--- docs/structures_Call.js.html | 6 +++--- docs/structures_Chat.js.html | 6 +++--- docs/structures_ClientInfo.js.html | 6 +++--- docs/structures_Contact.js.html | 6 +++--- docs/structures_GroupChat.js.html | 6 +++--- docs/structures_GroupNotification.js.html | 6 +++--- docs/structures_Label.js.html | 6 +++--- docs/structures_List.js.html | 6 +++--- docs/structures_Location.js.html | 6 +++--- docs/structures_Message.js.html | 6 +++--- docs/structures_MessageMedia.js.html | 6 +++--- docs/structures_Order.js.html | 6 +++--- docs/structures_Payment.js.html | 6 +++--- docs/structures_PrivateChat.js.html | 6 +++--- docs/structures_PrivateContact.js.html | 6 +++--- docs/structures_Product.js.html | 6 +++--- docs/structures_ProductMetadata.js.html | 6 +++--- docs/structures_Reaction.js.html | 6 +++--- docs/util_Constants.js.html | 6 +++--- docs/util_InterfaceController.js.html | 6 +++--- docs/util_Util.js.html | 6 +++--- package.json | 2 +- 60 files changed, 179 insertions(+), 179 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 8d659f4e1c..77231a4a32 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Base + whatsapp-web.js 1.18.1 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index f3b466818a..5956368dc5 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: BaseAuthStrategy + whatsapp-web.js 1.18.1 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index f82c6eeeba..eab9cd753d 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: BusinessContact + whatsapp-web.js 1.18.1 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index e5c7e30071..46e7b9659d 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Buttons + whatsapp-web.js 1.18.1 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 7c80fc9964..3388ab302e 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Call + whatsapp-web.js 1.18.1 » Class: Call @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

webClientShouldHandle diff --git a/docs/Chat.html b/docs/Chat.html index eebcf58145..df3f8a5437 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Chat + whatsapp-web.js 1.18.1 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 24b52a03c0..a7208606f7 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Client + whatsapp-web.js 1.18.1 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index c39799f968..c3d648a32d 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: Client.js + whatsapp-web.js 1.18.1 » Source: Client.js @@ -15,7 +15,7 @@ @@ -1224,7 +1224,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 064991c852..773e469d26 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: ClientInfo + whatsapp-web.js 1.18.1 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index 4594061a25..7434e191bc 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Contact + whatsapp-web.js 1.18.1 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index a39e454138..66229e3a30 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: GroupChat + whatsapp-web.js 1.18.1 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index eb9ce7ce5a..9e141e3c70 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: GroupNotification + whatsapp-web.js 1.18.1 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 707aee24fb..ae940456a7 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: InterfaceController + whatsapp-web.js 1.18.1 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index ab642e9ca1..dd347094d9 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Label + whatsapp-web.js 1.18.1 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index cc1aedbd70..bcf1a990d1 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: LegacySessionAuth + whatsapp-web.js 1.18.1 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index dce13cfe81..7e25526809 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: List + whatsapp-web.js 1.18.1 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index dbf9ed26eb..cabdefc943 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: LocalAuth + whatsapp-web.js 1.18.1 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index cfb20a0ec1..838a1a655f 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Location + whatsapp-web.js 1.18.1 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index 04e7b38d28..b3b00ce71b 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Message + whatsapp-web.js 1.18.1 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 1dc5e9abac..867b40e52c 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: MessageMedia + whatsapp-web.js 1.18.1 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 688a6ac324..59fa31d30d 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: NoAuth + whatsapp-web.js 1.18.1 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index 1cdda968a6..115a492ae7 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Order + whatsapp-web.js 1.18.1 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 1922966a11..5ed58ecca0 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: PrivateChat + whatsapp-web.js 1.18.1 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index b5257e03ef..965ec03e5c 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: PrivateContact + whatsapp-web.js 1.18.1 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 3f595d3be0..efd382c065 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Product + whatsapp-web.js 1.18.1 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index b291413302..ee5855e2d5 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Reaction + whatsapp-web.js 1.18.1 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 9a028bc72d..136674b21a 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: RemoteAuth + whatsapp-web.js 1.18.1 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index 86ed99c6b3..b308c264f9 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Class: Util + whatsapp-web.js 1.18.1 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 0912654e36..3900d7726f 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.18.1 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 344cfbfa5a..ff903be189 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.18.1 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 83cf47b3ee..040b0c4729 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.18.1 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index f6ee7a454d..2f54349336 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.18.1 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index 63709bd2d4..8bdd2e77fe 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.18.1 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index 89c6ad9c00..16a70a0007 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Globals + whatsapp-web.js 1.18.1 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index 3e2c8fd2f8..ca3c5c0e97 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Home + whatsapp-web.js 1.18.1 » Home @@ -15,7 +15,7 @@ @@ -27,7 +27,7 @@
@@ -3276,7 +3276,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 65d6ae73d4..e9df2021d9 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Base.js + whatsapp-web.js 1.18.1 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index c6740cb2ad..cc6b32b40d 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/BusinessContact.js + whatsapp-web.js 1.18.1 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 8be1944da6..02e405b246 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Buttons.js + whatsapp-web.js 1.18.1 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 81cb49b1eb..00ee9c0355 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Call.js + whatsapp-web.js 1.18.1 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 5521da6561..f8c0561a6a 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Chat.js + whatsapp-web.js 1.18.1 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index f591d3d37e..f75a6d6eda 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/ClientInfo.js + whatsapp-web.js 1.18.1 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 9280f8010f..043f0caced 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Contact.js + whatsapp-web.js 1.18.1 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index a3043e0c47..fb2afb131d 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/GroupChat.js + whatsapp-web.js 1.18.1 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -272,7 +272,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index dcc45b4b91..ad9040234c 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/GroupNotification.js + whatsapp-web.js 1.18.1 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 8edcac81e3..f0c922b9c9 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Label.js + whatsapp-web.js 1.18.1 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 85ada9e7ef..baf1f161d0 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/List.js + whatsapp-web.js 1.18.1 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 788874f81b..4a4cf80b0f 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Location.js + whatsapp-web.js 1.18.1 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 193ada00ee..9853f2626a 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Message.js + whatsapp-web.js 1.18.1 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -569,7 +569,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 07dc863030..f4e96a7738 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/MessageMedia.js + whatsapp-web.js 1.18.1 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index e2b2716a82..3ab31a3bf2 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Order.js + whatsapp-web.js 1.18.1 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index bb84d740bc..282f375015 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Payment.js + whatsapp-web.js 1.18.1 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 100c40388b..10e6230996 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/PrivateChat.js + whatsapp-web.js 1.18.1 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index ebea085ac4..2550477919 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/PrivateContact.js + whatsapp-web.js 1.18.1 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 7fccd8ae0b..19e2beea8e 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Product.js + whatsapp-web.js 1.18.1 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index 62e786bd0d..24942442c6 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.18.1 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index bcdc65e4be..d5e6817e5b 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: structures/Reaction.js + whatsapp-web.js 1.18.1 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 84a5d6f31a..6267643981 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: util/Constants.js + whatsapp-web.js 1.18.1 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index a036bd64f7..775d9faa8c 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: util/InterfaceController.js + whatsapp-web.js 1.18.1 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -160,7 +160,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index 6906bf1a81..22e2dcb51e 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.0 » Source: util/Util.js + whatsapp-web.js 1.18.1 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index e7e47ae163..6566140ef2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.0", + "version": "1.18.1", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 7bb7f13f07c8c7fac044c6c75bd180eabebd78b0 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Wed, 26 Oct 2022 22:45:05 -0400 Subject: [PATCH 006/139] bump supported version --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89ff5e5430..c26079d860 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2240.7](https://img.shields.io/badge/WhatsApp_Web-2.2240.7-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2241.6](https://img.shields.io/badge/WhatsApp_Web-2.2241.6-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index f3c915135d..0b7f6f6d61 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2240.7 \ No newline at end of file +2.2241.6 \ No newline at end of file From 9981723505bfab7c2a5e109eaa7ba814d0205158 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Wed, 26 Oct 2022 23:32:06 -0400 Subject: [PATCH 007/139] fix: message replies compatible with WhatsApp Web v2.2241.6 (#1765) * fix message replies * fix up some tests --- src/util/Injected.js | 9 ++++++++- tests/client.js | 5 ++--- tests/structures/message.js | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 4184de8665..c513373ca3 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -50,6 +50,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.sendReactionToMsg = window.mR.findModule('sendReactionToMsg')[0].sendReactionToMsg; window.Store.createOrUpdateReactionsModule = window.mR.findModule('createOrUpdateReactions')[0]; window.Store.EphemeralFields = window.mR.findModule('getEphemeralFields')[0]; + window.Store.ReplyUtils = window.mR.findModule('canReplyMsg').length > 0 && window.mR.findModule('canReplyMsg')[0]; window.Store.StickerTools = { ...window.mR.findModule('toWebpSticker')[0], ...window.mR.findModule('addWebpMetadata')[0] @@ -116,7 +117,13 @@ exports.LoadUtils = () => { let quotedMsgOptions = {}; if (options.quotedMessageId) { let quotedMessage = window.Store.Msg.get(options.quotedMessageId); - if (quotedMessage.canReply()) { + + // TODO remove .canReply() once all clients are updated to >= v2.2241.6 + const canReply = window.Store.ReplyUtils ? + window.Store.ReplyUtils.canReplyMsg(quotedMessage.unsafe()) : + quotedMessage.canReply(); + + if (canReply) { quotedMsgOptions = quotedMessage.msgContextInfo(chat); } delete options.quotedMessageId; diff --git a/tests/client.js b/tests/client.js index 55f5334c1c..0118c2010e 100644 --- a/tests/client.js +++ b/tests/client.js @@ -98,7 +98,7 @@ describe('Client', function() { await helper.sleep(20000); expect(callback.called).to.equal(true); - expect(callback.args[0][0]).to.have.lengthOf(152); + expect(callback.args[0][0]).to.have.length.greaterThanOrEqual(152); await client.destroy(); }); @@ -224,7 +224,7 @@ describe('Client', function() { expect(authFailCallback.called).to.equal(true); expect(qrCallback.called).to.equal(true); - expect(qrCallback.args[0][0]).to.have.lengthOf(152); + expect(qrCallback.args[0][0]).to.have.length.greaterThanOrEqual(152); await client.destroy(); }); @@ -346,7 +346,6 @@ describe('Client', function() { 'UserConstructor', 'VCard', 'Validators', - 'Wap', 'WidFactory', 'findCommonGroups', 'sendReactionToMsg', diff --git a/tests/structures/message.js b/tests/structures/message.js index 7a9749d358..0f87e53b18 100644 --- a/tests/structures/message.js +++ b/tests/structures/message.js @@ -66,6 +66,8 @@ describe('Message', function () { expect(message.isStarred).to.equal(false); await message.star(); + await helper.sleep(1000); + // reload and check await message.reload(); expect(message.isStarred).to.equal(true); @@ -75,6 +77,8 @@ describe('Message', function () { expect(message.isStarred).to.equal(true); await message.unstar(); + await helper.sleep(1000); + // reload and check await message.reload(); expect(message.isStarred).to.equal(false); @@ -85,7 +89,7 @@ describe('Message', function () { it('can delete a message for me', async function () { await message.delete(); - await helper.sleep(1000); + await helper.sleep(5000); expect(await message.reload()).to.equal(null); }); From 6f7c5c2dd9a617f84dd9ba9fc61b6bd441816317 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Wed, 26 Oct 2022 23:32:56 -0400 Subject: [PATCH 008/139] chore: mark version v1.18.2 --- docs/Base.html | 4 ++-- docs/BaseAuthStrategy.html | 4 ++-- docs/BusinessContact.html | 4 ++-- docs/Buttons.html | 4 ++-- docs/Call.html | 4 ++-- docs/Chat.html | 4 ++-- docs/Client.html | 4 ++-- docs/Client.js.html | 4 ++-- docs/ClientInfo.html | 4 ++-- docs/Contact.html | 4 ++-- docs/GroupChat.html | 4 ++-- docs/GroupNotification.html | 4 ++-- docs/InterfaceController.html | 4 ++-- docs/Label.html | 4 ++-- docs/LegacySessionAuth.html | 4 ++-- docs/List.html | 4 ++-- docs/LocalAuth.html | 4 ++-- docs/Location.html | 4 ++-- docs/Message.html | 4 ++-- docs/MessageMedia.html | 4 ++-- docs/NoAuth.html | 4 ++-- docs/Order.html | 4 ++-- docs/PrivateChat.html | 4 ++-- docs/PrivateContact.html | 4 ++-- docs/Product.html | 4 ++-- docs/Reaction.html | 4 ++-- docs/RemoteAuth.html | 4 ++-- docs/Util.html | 4 ++-- docs/authStrategies_BaseAuthStrategy.js.html | 4 ++-- docs/authStrategies_LegacySessionAuth.js.html | 4 ++-- docs/authStrategies_LocalAuth.js.html | 4 ++-- docs/authStrategies_NoAuth.js.html | 4 ++-- docs/authStrategies_RemoteAuth.js.html | 4 ++-- docs/global.html | 4 ++-- docs/index.html | 8 ++++---- docs/structures_Base.js.html | 4 ++-- docs/structures_BusinessContact.js.html | 4 ++-- docs/structures_Buttons.js.html | 4 ++-- docs/structures_Call.js.html | 4 ++-- docs/structures_Chat.js.html | 4 ++-- docs/structures_ClientInfo.js.html | 4 ++-- docs/structures_Contact.js.html | 4 ++-- docs/structures_GroupChat.js.html | 4 ++-- docs/structures_GroupNotification.js.html | 4 ++-- docs/structures_Label.js.html | 4 ++-- docs/structures_List.js.html | 4 ++-- docs/structures_Location.js.html | 4 ++-- docs/structures_Message.js.html | 4 ++-- docs/structures_MessageMedia.js.html | 4 ++-- docs/structures_Order.js.html | 4 ++-- docs/structures_Payment.js.html | 4 ++-- docs/structures_PrivateChat.js.html | 4 ++-- docs/structures_PrivateContact.js.html | 4 ++-- docs/structures_Product.js.html | 4 ++-- docs/structures_ProductMetadata.js.html | 4 ++-- docs/structures_Reaction.js.html | 4 ++-- docs/util_Constants.js.html | 4 ++-- docs/util_InterfaceController.js.html | 4 ++-- docs/util_Util.js.html | 4 ++-- package.json | 2 +- 60 files changed, 121 insertions(+), 121 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 77231a4a32..cee5e70c3e 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Base + whatsapp-web.js 1.18.2 » Class: Base @@ -15,7 +15,7 @@ diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 5956368dc5..8b6f33f1b4 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: BaseAuthStrategy + whatsapp-web.js 1.18.2 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index eab9cd753d..7980005aa0 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: BusinessContact + whatsapp-web.js 1.18.2 » Class: BusinessContact @@ -15,7 +15,7 @@ diff --git a/docs/Buttons.html b/docs/Buttons.html index 46e7b9659d..d6c2ce2efd 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Buttons + whatsapp-web.js 1.18.2 » Class: Buttons @@ -15,7 +15,7 @@ diff --git a/docs/Call.html b/docs/Call.html index 3388ab302e..d92e969432 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Call + whatsapp-web.js 1.18.2 » Class: Call @@ -15,7 +15,7 @@ diff --git a/docs/Chat.html b/docs/Chat.html index df3f8a5437..93d56b418e 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Chat + whatsapp-web.js 1.18.2 » Class: Chat @@ -15,7 +15,7 @@ diff --git a/docs/Client.html b/docs/Client.html index a7208606f7..7e13c9b155 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Client + whatsapp-web.js 1.18.2 » Class: Client @@ -15,7 +15,7 @@ diff --git a/docs/Client.js.html b/docs/Client.js.html index c3d648a32d..4045ce34d3 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: Client.js + whatsapp-web.js 1.18.2 » Source: Client.js @@ -15,7 +15,7 @@ diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 773e469d26..04c988e456 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: ClientInfo + whatsapp-web.js 1.18.2 » Class: ClientInfo @@ -15,7 +15,7 @@ diff --git a/docs/Contact.html b/docs/Contact.html index 7434e191bc..c4a20f8481 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Contact + whatsapp-web.js 1.18.2 » Class: Contact @@ -15,7 +15,7 @@ diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 66229e3a30..fbf63f4fc9 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: GroupChat + whatsapp-web.js 1.18.2 » Class: GroupChat @@ -15,7 +15,7 @@ diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 9e141e3c70..a6911931a6 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: GroupNotification + whatsapp-web.js 1.18.2 » Class: GroupNotification @@ -15,7 +15,7 @@ diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index ae940456a7..c8992f05aa 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: InterfaceController + whatsapp-web.js 1.18.2 » Class: InterfaceController @@ -15,7 +15,7 @@ diff --git a/docs/Label.html b/docs/Label.html index dd347094d9..a05b3774c7 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Label + whatsapp-web.js 1.18.2 » Class: Label @@ -15,7 +15,7 @@ diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index bcf1a990d1..53bbfde52c 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: LegacySessionAuth + whatsapp-web.js 1.18.2 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ diff --git a/docs/List.html b/docs/List.html index 7e25526809..6af1ec2f06 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: List + whatsapp-web.js 1.18.2 » Class: List @@ -15,7 +15,7 @@ diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index cabdefc943..305dc59181 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: LocalAuth + whatsapp-web.js 1.18.2 » Class: LocalAuth @@ -15,7 +15,7 @@ diff --git a/docs/Location.html b/docs/Location.html index 838a1a655f..7d980a24c4 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Location + whatsapp-web.js 1.18.2 » Class: Location @@ -15,7 +15,7 @@ diff --git a/docs/Message.html b/docs/Message.html index b3b00ce71b..f9440d0126 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Message + whatsapp-web.js 1.18.2 » Class: Message @@ -15,7 +15,7 @@ diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 867b40e52c..353127f030 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: MessageMedia + whatsapp-web.js 1.18.2 » Class: MessageMedia @@ -15,7 +15,7 @@ diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 59fa31d30d..62a8caec57 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: NoAuth + whatsapp-web.js 1.18.2 » Class: NoAuth @@ -15,7 +15,7 @@ diff --git a/docs/Order.html b/docs/Order.html index 115a492ae7..1b6208056c 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Order + whatsapp-web.js 1.18.2 » Class: Order @@ -15,7 +15,7 @@ diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 5ed58ecca0..f8a8298eaa 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: PrivateChat + whatsapp-web.js 1.18.2 » Class: PrivateChat @@ -15,7 +15,7 @@ diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 965ec03e5c..94d23ce52d 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: PrivateContact + whatsapp-web.js 1.18.2 » Class: PrivateContact @@ -15,7 +15,7 @@ diff --git a/docs/Product.html b/docs/Product.html index efd382c065..7dcbfbe76d 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Product + whatsapp-web.js 1.18.2 » Class: Product @@ -15,7 +15,7 @@ diff --git a/docs/Reaction.html b/docs/Reaction.html index ee5855e2d5..4817db4503 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Reaction + whatsapp-web.js 1.18.2 » Class: Reaction @@ -15,7 +15,7 @@ diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 136674b21a..0d0703104a 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: RemoteAuth + whatsapp-web.js 1.18.2 » Class: RemoteAuth @@ -15,7 +15,7 @@ diff --git a/docs/Util.html b/docs/Util.html index b308c264f9..0d788191cc 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Class: Util + whatsapp-web.js 1.18.2 » Class: Util @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 3900d7726f..992219b443 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.18.2 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index ff903be189..d8039856f5 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.18.2 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 040b0c4729..6a8254ada7 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.18.2 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 2f54349336..a9aab1dc8b 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.18.2 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index 8bdd2e77fe..16953eb03d 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.18.2 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/global.html b/docs/global.html index 16a70a0007..59cb73deac 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Globals + whatsapp-web.js 1.18.2 » Globals @@ -15,7 +15,7 @@ diff --git a/docs/index.html b/docs/index.html index ca3c5c0e97..032bf264c6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Home + whatsapp-web.js 1.18.2 » Home @@ -15,7 +15,7 @@ @@ -27,11 +27,11 @@
-

npm Depfu WhatsApp_Web 2.2240.7 Discord Chat

+

npm Depfu WhatsApp_Web 2.2241.6 Discord Chat

whatsapp-web.js

A WhatsApp API client that connects through the WhatsApp Web browser app

It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index e9df2021d9..df20a92687 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Base.js + whatsapp-web.js 1.18.2 » Source: structures/Base.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index cc6b32b40d..90aaecc5d4 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/BusinessContact.js + whatsapp-web.js 1.18.2 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 02e405b246..4699fdebfb 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Buttons.js + whatsapp-web.js 1.18.2 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 00ee9c0355..2118c5ddb3 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Call.js + whatsapp-web.js 1.18.2 » Source: structures/Call.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index f8c0561a6a..96fe03d1e0 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Chat.js + whatsapp-web.js 1.18.2 » Source: structures/Chat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index f75a6d6eda..71f96428a2 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/ClientInfo.js + whatsapp-web.js 1.18.2 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 043f0caced..39cbc5fecd 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Contact.js + whatsapp-web.js 1.18.2 » Source: structures/Contact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index fb2afb131d..1faee566e1 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/GroupChat.js + whatsapp-web.js 1.18.2 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index ad9040234c..294124542d 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/GroupNotification.js + whatsapp-web.js 1.18.2 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index f0c922b9c9..5fc785d11d 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Label.js + whatsapp-web.js 1.18.2 » Source: structures/Label.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index baf1f161d0..0e2c027016 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/List.js + whatsapp-web.js 1.18.2 » Source: structures/List.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 4a4cf80b0f..353d381b4b 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Location.js + whatsapp-web.js 1.18.2 » Source: structures/Location.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 9853f2626a..259bc90575 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Message.js + whatsapp-web.js 1.18.2 » Source: structures/Message.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index f4e96a7738..1c3f7aa3e9 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/MessageMedia.js + whatsapp-web.js 1.18.2 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 3ab31a3bf2..313a26faba 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Order.js + whatsapp-web.js 1.18.2 » Source: structures/Order.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 282f375015..a4f19c68ea 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Payment.js + whatsapp-web.js 1.18.2 » Source: structures/Payment.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 10e6230996..3d1b45791c 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/PrivateChat.js + whatsapp-web.js 1.18.2 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 2550477919..8e24243758 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/PrivateContact.js + whatsapp-web.js 1.18.2 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 19e2beea8e..b3d345ed88 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Product.js + whatsapp-web.js 1.18.2 » Source: structures/Product.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index 24942442c6..f4b68e2e7c 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.18.2 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index d5e6817e5b..2efca66507 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: structures/Reaction.js + whatsapp-web.js 1.18.2 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 6267643981..1169b26218 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: util/Constants.js + whatsapp-web.js 1.18.2 » Source: util/Constants.js @@ -15,7 +15,7 @@ diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 775d9faa8c..d034985520 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: util/InterfaceController.js + whatsapp-web.js 1.18.2 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index 22e2dcb51e..a21b1451be 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.1 » Source: util/Util.js + whatsapp-web.js 1.18.2 » Source: util/Util.js @@ -15,7 +15,7 @@ diff --git a/package.json b/package.json index 6566140ef2..90094ea8ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.1", + "version": "1.18.2", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 82120f0446170b14d3ffa18c8fd65d418d7f2fb6 Mon Sep 17 00:00:00 2001 From: Felipe Martins Date: Sun, 13 Nov 2022 08:36:06 -0300 Subject: [PATCH 009/139] Fix GroupMetadata module (#1789) * Fix GroupMetadata module * Update src/util/Injected.js Co-authored-by: Felipe Martins Co-authored-by: Rajeh Taher --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index c513373ca3..ed0f5dc1fd 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -14,7 +14,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0]; window.Store.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager; window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].LegacyPhoneFeatures; - window.Store.GroupMetadata = window.mR.findModule((module) => module.default && module.default.handlePendingInvite)[0].default; + window.Store.GroupMetadata = window.mR.findModule('GroupMetadata')[0].default.GroupMetadata; window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0]; window.Store.InviteInfo = window.mR.findModule('sendQueryGroupInvite')[0]; window.Store.Label = window.mR.findModule('LabelCollection')[0].LabelCollection; From e8bae22b0317cded6065fda32bba761734fc5cd6 Mon Sep 17 00:00:00 2001 From: WWebJS Bot Date: Sun, 13 Nov 2022 17:54:03 +0000 Subject: [PATCH 010/139] 1.18.3-alpha.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 90094ea8ae..ef4f250430 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.2", + "version": "1.18.3-alpha.0", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From a60f5ebf407e4f8183947c497e65bb149a707dc7 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sun, 13 Nov 2022 21:12:55 -0500 Subject: [PATCH 011/139] chore: mark version v1.18.3 --- docs/Base.html | 8 ++++---- docs/BaseAuthStrategy.html | 8 ++++---- docs/BusinessContact.html | 8 ++++---- docs/Buttons.html | 8 ++++---- docs/Call.html | 8 ++++---- docs/Chat.html | 8 ++++---- docs/Client.html | 8 ++++---- docs/Client.js.html | 8 ++++---- docs/ClientInfo.html | 8 ++++---- docs/Contact.html | 8 ++++---- docs/GroupChat.html | 8 ++++---- docs/GroupNotification.html | 8 ++++---- docs/InterfaceController.html | 8 ++++---- docs/Label.html | 8 ++++---- docs/LegacySessionAuth.html | 8 ++++---- docs/List.html | 8 ++++---- docs/LocalAuth.html | 8 ++++---- docs/Location.html | 8 ++++---- docs/Message.html | 8 ++++---- docs/MessageMedia.html | 8 ++++---- docs/NoAuth.html | 8 ++++---- docs/Order.html | 8 ++++---- docs/PrivateChat.html | 8 ++++---- docs/PrivateContact.html | 8 ++++---- docs/Product.html | 8 ++++---- docs/Reaction.html | 8 ++++---- docs/RemoteAuth.html | 8 ++++---- docs/Util.html | 8 ++++---- docs/authStrategies_BaseAuthStrategy.js.html | 8 ++++---- docs/authStrategies_LegacySessionAuth.js.html | 8 ++++---- docs/authStrategies_LocalAuth.js.html | 8 ++++---- docs/authStrategies_NoAuth.js.html | 8 ++++---- docs/authStrategies_RemoteAuth.js.html | 8 ++++---- docs/global.html | 8 ++++---- docs/index.html | 10 +++++----- docs/structures_Base.js.html | 8 ++++---- docs/structures_BusinessContact.js.html | 8 ++++---- docs/structures_Buttons.js.html | 8 ++++---- docs/structures_Call.js.html | 8 ++++---- docs/structures_Chat.js.html | 8 ++++---- docs/structures_ClientInfo.js.html | 8 ++++---- docs/structures_Contact.js.html | 8 ++++---- docs/structures_GroupChat.js.html | 8 ++++---- docs/structures_GroupNotification.js.html | 8 ++++---- docs/structures_Label.js.html | 8 ++++---- docs/structures_List.js.html | 8 ++++---- docs/structures_Location.js.html | 8 ++++---- docs/structures_Message.js.html | 8 ++++---- docs/structures_MessageMedia.js.html | 8 ++++---- docs/structures_Order.js.html | 8 ++++---- docs/structures_Payment.js.html | 8 ++++---- docs/structures_PrivateChat.js.html | 8 ++++---- docs/structures_PrivateContact.js.html | 8 ++++---- docs/structures_Product.js.html | 8 ++++---- docs/structures_ProductMetadata.js.html | 8 ++++---- docs/structures_Reaction.js.html | 8 ++++---- docs/util_Constants.js.html | 8 ++++---- docs/util_InterfaceController.js.html | 8 ++++---- docs/util_Util.js.html | 8 ++++---- package.json | 2 +- 60 files changed, 238 insertions(+), 238 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index cee5e70c3e..a083e1ca3a 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Base + whatsapp-web.js 1.18.3 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 8b6f33f1b4..4942559a60 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: BaseAuthStrategy + whatsapp-web.js 1.18.3 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 7980005aa0..c08a29f155 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: BusinessContact + whatsapp-web.js 1.18.3 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index d6c2ce2efd..4bca95a360 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Buttons + whatsapp-web.js 1.18.3 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index d92e969432..1fb3718402 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Call + whatsapp-web.js 1.18.3 » Class: Call @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

webClientShouldHandle diff --git a/docs/Chat.html b/docs/Chat.html index 93d56b418e..e1962b8b55 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Chat + whatsapp-web.js 1.18.3 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 7e13c9b155..0caa359aed 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Client + whatsapp-web.js 1.18.3 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index 4045ce34d3..cfe0679740 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: Client.js + whatsapp-web.js 1.18.3 » Source: Client.js @@ -15,7 +15,7 @@ @@ -1224,7 +1224,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 04c988e456..672f2e7ae1 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: ClientInfo + whatsapp-web.js 1.18.3 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index c4a20f8481..a217893593 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Contact + whatsapp-web.js 1.18.3 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index fbf63f4fc9..0cc37642f5 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: GroupChat + whatsapp-web.js 1.18.3 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index a6911931a6..7988faf35b 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: GroupNotification + whatsapp-web.js 1.18.3 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index c8992f05aa..ea2ba998ec 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: InterfaceController + whatsapp-web.js 1.18.3 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index a05b3774c7..923d0a82da 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Label + whatsapp-web.js 1.18.3 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 53bbfde52c..d8daea1601 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: LegacySessionAuth + whatsapp-web.js 1.18.3 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index 6af1ec2f06..53a5a87731 100644 --- a/docs/List.html +++ b/docs/List.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: List + whatsapp-web.js 1.18.3 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 305dc59181..3f295bcc03 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: LocalAuth + whatsapp-web.js 1.18.3 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index 7d980a24c4..798db80fec 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Location + whatsapp-web.js 1.18.3 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index f9440d0126..c9748e5377 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Message + whatsapp-web.js 1.18.3 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 353127f030..49d54e78ee 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: MessageMedia + whatsapp-web.js 1.18.3 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 62a8caec57..f821b5fe14 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: NoAuth + whatsapp-web.js 1.18.3 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index 1b6208056c..98ef4d741b 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Order + whatsapp-web.js 1.18.3 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index f8a8298eaa..e89e6b9cba 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: PrivateChat + whatsapp-web.js 1.18.3 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 94d23ce52d..1d966cc400 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: PrivateContact + whatsapp-web.js 1.18.3 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 7dcbfbe76d..1605eadb21 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Product + whatsapp-web.js 1.18.3 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index 4817db4503..61e0c4e8ac 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Reaction + whatsapp-web.js 1.18.3 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 0d0703104a..28a2eaebde 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: RemoteAuth + whatsapp-web.js 1.18.3 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index 0d788191cc..c9a03b019c 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Class: Util + whatsapp-web.js 1.18.3 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 992219b443..dba1b7358f 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.18.3 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index d8039856f5..861fa78e62 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.18.3 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 6a8254ada7..c8cd2ffcd4 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.18.3 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index a9aab1dc8b..65269ba77a 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.18.3 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index 16953eb03d..90965a2303 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.18.3 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index 59cb73deac..5c2a3328cc 100644 --- a/docs/global.html +++ b/docs/global.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Globals + whatsapp-web.js 1.18.3 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index 032bf264c6..3c0349bd30 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Home + whatsapp-web.js 1.18.3 » Home @@ -15,7 +15,7 @@ @@ -27,7 +27,7 @@
@@ -3276,7 +3276,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index df20a92687..84d94205b3 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Base.js + whatsapp-web.js 1.18.3 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 90aaecc5d4..5627b3a67c 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/BusinessContact.js + whatsapp-web.js 1.18.3 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 4699fdebfb..1555c38bd5 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Buttons.js + whatsapp-web.js 1.18.3 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 2118c5ddb3..15ef35a35d 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Call.js + whatsapp-web.js 1.18.3 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 96fe03d1e0..c6352d3754 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Chat.js + whatsapp-web.js 1.18.3 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 71f96428a2..eb40d8eaaf 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/ClientInfo.js + whatsapp-web.js 1.18.3 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 39cbc5fecd..52e76110a0 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Contact.js + whatsapp-web.js 1.18.3 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index 1faee566e1..e8757ac56c 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/GroupChat.js + whatsapp-web.js 1.18.3 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -272,7 +272,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 294124542d..0a924bdd0b 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/GroupNotification.js + whatsapp-web.js 1.18.3 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 5fc785d11d..7caa8bcbd7 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Label.js + whatsapp-web.js 1.18.3 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 0e2c027016..3c787d8c31 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/List.js + whatsapp-web.js 1.18.3 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 353d381b4b..202e68d8d5 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Location.js + whatsapp-web.js 1.18.3 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 259bc90575..43e0e028df 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Message.js + whatsapp-web.js 1.18.3 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -569,7 +569,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 1c3f7aa3e9..65b3615fb4 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/MessageMedia.js + whatsapp-web.js 1.18.3 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 313a26faba..42a516912e 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Order.js + whatsapp-web.js 1.18.3 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index a4f19c68ea..41aafb1621 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Payment.js + whatsapp-web.js 1.18.3 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 3d1b45791c..8d7d2a90d1 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/PrivateChat.js + whatsapp-web.js 1.18.3 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 8e24243758..88010e70e5 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/PrivateContact.js + whatsapp-web.js 1.18.3 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index b3d345ed88..6820848958 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Product.js + whatsapp-web.js 1.18.3 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index f4b68e2e7c..0c6dd41b91 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.18.3 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 2efca66507..21d744b9a5 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: structures/Reaction.js + whatsapp-web.js 1.18.3 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 1169b26218..e67ff21f50 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: util/Constants.js + whatsapp-web.js 1.18.3 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index d034985520..394330aef2 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: util/InterfaceController.js + whatsapp-web.js 1.18.3 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -160,7 +160,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index a21b1451be..e66c61d21b 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.2 » Source: util/Util.js + whatsapp-web.js 1.18.3 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index ef4f250430..363e0d9e26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.3-alpha.0", + "version": "1.18.3", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From d9f9c28276a3ce63661193118dd60a774226ea20 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 26 Nov 2022 04:38:29 -0400 Subject: [PATCH 012/139] fix: get quoted msg (#1841) --- src/structures/Message.js | 5 +++-- src/util/Injected.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index e8260dd264..25f418ad4e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -305,8 +305,9 @@ class Message extends Base { if (!this.hasQuotedMsg) return undefined; const quotedMsg = await this.client.pupPage.evaluate((msgId) => { - let msg = window.Store.Msg.get(msgId); - return msg.quotedMsgObj().serialize(); + const msg = window.Store.Msg.get(msgId); + const quotedMsg = window.Store.QuotedMsg.getQuotedMsgObj(msg); + return window.WWebJS.getMessageModel(quotedMsg); }, this.id._serialized); return new Message(this.client, quotedMsg); diff --git a/src/util/Injected.js b/src/util/Injected.js index ed0f5dc1fd..bd9316cc87 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -51,6 +51,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.createOrUpdateReactionsModule = window.mR.findModule('createOrUpdateReactions')[0]; window.Store.EphemeralFields = window.mR.findModule('getEphemeralFields')[0]; window.Store.ReplyUtils = window.mR.findModule('canReplyMsg').length > 0 && window.mR.findModule('canReplyMsg')[0]; + window.Store.QuotedMsg = window.mR.findModule('getQuotedMsgObj')[0]; window.Store.StickerTools = { ...window.mR.findModule('toWebpSticker')[0], ...window.mR.findModule('addWebpMetadata')[0] From db55d869f819c62ca56a77427d91966b0b832ec4 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 26 Nov 2022 04:44:35 -0400 Subject: [PATCH 013/139] fix: delete messages for everyone (#1842) --- src/structures/Message.js | 3 ++- src/util/Injected.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 25f418ad4e..9af132ce8b 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -437,7 +437,8 @@ class Message extends Base { await this.client.pupPage.evaluate((msgId, everyone) => { let msg = window.Store.Msg.get(msgId); - if (everyone && msg._canRevoke()) { + const canRevoke = window.Store.MsgActionChecks.canSenderRevokeMsg(msg) || window.Store.MsgActionChecks.canAdminRevokeMsg(msg); + if (everyone && canRevoke) { return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], { type: msg.id.fromMe ? 'Sender' : 'Admin' }); } diff --git a/src/util/Injected.js b/src/util/Injected.js index bd9316cc87..7ece210aed 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -51,6 +51,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.createOrUpdateReactionsModule = window.mR.findModule('createOrUpdateReactions')[0]; window.Store.EphemeralFields = window.mR.findModule('getEphemeralFields')[0]; window.Store.ReplyUtils = window.mR.findModule('canReplyMsg').length > 0 && window.mR.findModule('canReplyMsg')[0]; + window.Store.MsgActionChecks = window.mR.findModule('canSenderRevokeMsg')[0]; window.Store.QuotedMsg = window.mR.findModule('getQuotedMsgObj')[0]; window.Store.StickerTools = { ...window.mR.findModule('toWebpSticker')[0], From dc91562f3cadfe68adcf4622853fa8d44b3e9ce1 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sat, 26 Nov 2022 05:12:54 -0400 Subject: [PATCH 014/139] fix: star/unstar messages (#1843) --- src/structures/Message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 9af132ce8b..ee79c20177 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -453,7 +453,7 @@ class Message extends Base { await this.client.pupPage.evaluate((msgId) => { let msg = window.Store.Msg.get(msgId); - if (msg.canStar()) { + if (window.Store.MsgActionChecks.canStarMsg(msg)) { return window.Store.Cmd.sendStarMsgs(msg.chat, [msg], false); } }, this.id._serialized); @@ -466,7 +466,7 @@ class Message extends Base { await this.client.pupPage.evaluate((msgId) => { let msg = window.Store.Msg.get(msgId); - if (msg.canStar()) { + if (window.Store.MsgActionChecks.canStarMsg(msg)) { return window.Store.Cmd.sendUnstarMsgs(msg.chat, [msg], false); } }, this.id._serialized); From a15f1b8428bf420152268b4b17a76fe19efe8b9d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 26 Nov 2022 05:26:46 -0400 Subject: [PATCH 015/139] Update supported WhatsApp Web version to v2.2245.9 (#1764) Co-authored-by: pedroslopez --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c26079d860..3824f63406 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2241.6](https://img.shields.io/badge/WhatsApp_Web-2.2241.6-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2245.9](https://img.shields.io/badge/WhatsApp_Web-2.2245.9-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index 0b7f6f6d61..53ab36c0b5 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2241.6 \ No newline at end of file +2.2245.9 \ No newline at end of file From 6fe1017bd3e422f6dad5a57efbffc16f85391340 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 26 Nov 2022 05:27:37 -0400 Subject: [PATCH 016/139] chore: mark version v1.18.4 --- docs/Base.html | 8 ++++---- docs/BaseAuthStrategy.html | 8 ++++---- docs/BusinessContact.html | 8 ++++---- docs/Buttons.html | 8 ++++---- docs/Call.html | 8 ++++---- docs/Chat.html | 8 ++++---- docs/Client.html | 8 ++++---- docs/Client.js.html | 8 ++++---- docs/ClientInfo.html | 8 ++++---- docs/Contact.html | 8 ++++---- docs/GroupChat.html | 8 ++++---- docs/GroupNotification.html | 8 ++++---- docs/InterfaceController.html | 8 ++++---- docs/Label.html | 8 ++++---- docs/LegacySessionAuth.html | 8 ++++---- docs/List.html | 8 ++++---- docs/LocalAuth.html | 8 ++++---- docs/Location.html | 8 ++++---- docs/Message.html | 8 ++++---- docs/MessageMedia.html | 8 ++++---- docs/NoAuth.html | 8 ++++---- docs/Order.html | 8 ++++---- docs/PrivateChat.html | 8 ++++---- docs/PrivateContact.html | 8 ++++---- docs/Product.html | 8 ++++---- docs/Reaction.html | 8 ++++---- docs/RemoteAuth.html | 8 ++++---- docs/Util.html | 8 ++++---- docs/authStrategies_BaseAuthStrategy.js.html | 8 ++++---- docs/authStrategies_LegacySessionAuth.js.html | 8 ++++---- docs/authStrategies_LocalAuth.js.html | 8 ++++---- docs/authStrategies_NoAuth.js.html | 8 ++++---- docs/authStrategies_RemoteAuth.js.html | 8 ++++---- docs/global.html | 8 ++++---- docs/index.html | 12 +++++------ docs/structures_Base.js.html | 8 ++++---- docs/structures_BusinessContact.js.html | 8 ++++---- docs/structures_Buttons.js.html | 8 ++++---- docs/structures_Call.js.html | 8 ++++---- docs/structures_Chat.js.html | 8 ++++---- docs/structures_ClientInfo.js.html | 8 ++++---- docs/structures_Contact.js.html | 8 ++++---- docs/structures_GroupChat.js.html | 8 ++++---- docs/structures_GroupNotification.js.html | 8 ++++---- docs/structures_Label.js.html | 8 ++++---- docs/structures_List.js.html | 8 ++++---- docs/structures_Location.js.html | 8 ++++---- docs/structures_Message.js.html | 20 ++++++++++--------- docs/structures_MessageMedia.js.html | 8 ++++---- docs/structures_Order.js.html | 8 ++++---- docs/structures_Payment.js.html | 8 ++++---- docs/structures_PrivateChat.js.html | 8 ++++---- docs/structures_PrivateContact.js.html | 8 ++++---- docs/structures_Product.js.html | 8 ++++---- docs/structures_ProductMetadata.js.html | 8 ++++---- docs/structures_Reaction.js.html | 8 ++++---- docs/util_Constants.js.html | 8 ++++---- docs/util_InterfaceController.js.html | 8 ++++---- docs/util_Util.js.html | 8 ++++---- package.json | 2 +- 60 files changed, 246 insertions(+), 244 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index a083e1ca3a..53e15f4549 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Base + whatsapp-web.js 1.18.4 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 4942559a60..88de5bb66e 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: BaseAuthStrategy + whatsapp-web.js 1.18.4 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index c08a29f155..3269010944 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: BusinessContact + whatsapp-web.js 1.18.4 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index 4bca95a360..f619730250 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Buttons + whatsapp-web.js 1.18.4 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 1fb3718402..1f049398bf 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Call + whatsapp-web.js 1.18.4 » Class: Call @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

webClientShouldHandle diff --git a/docs/Chat.html b/docs/Chat.html index e1962b8b55..3efe708175 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Chat + whatsapp-web.js 1.18.4 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 0caa359aed..60a721719a 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Client + whatsapp-web.js 1.18.4 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index cfe0679740..8a16378dd1 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: Client.js + whatsapp-web.js 1.18.4 » Source: Client.js @@ -15,7 +15,7 @@ @@ -1224,7 +1224,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 672f2e7ae1..f9976b7fc2 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: ClientInfo + whatsapp-web.js 1.18.4 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index a217893593..515e13b532 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Contact + whatsapp-web.js 1.18.4 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 0cc37642f5..e00d4eaade 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: GroupChat + whatsapp-web.js 1.18.4 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 7988faf35b..aa4a01c063 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: GroupNotification + whatsapp-web.js 1.18.4 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index ea2ba998ec..8b97ada245 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: InterfaceController + whatsapp-web.js 1.18.4 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index 923d0a82da..7a429f64c0 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Label + whatsapp-web.js 1.18.4 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index d8daea1601..65dfb467f4 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: LegacySessionAuth + whatsapp-web.js 1.18.4 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index 53a5a87731..2033a98e78 100644 --- a/docs/List.html +++ b/docs/List.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: List + whatsapp-web.js 1.18.4 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 3f295bcc03..2b8c83eb8f 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: LocalAuth + whatsapp-web.js 1.18.4 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index 798db80fec..7714777e4a 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Location + whatsapp-web.js 1.18.4 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index c9748e5377..d63f606fe0 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Message + whatsapp-web.js 1.18.4 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 49d54e78ee..4213281980 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: MessageMedia + whatsapp-web.js 1.18.4 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index f821b5fe14..178c61e00c 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: NoAuth + whatsapp-web.js 1.18.4 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index 98ef4d741b..7cc642974a 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Order + whatsapp-web.js 1.18.4 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index e89e6b9cba..8317e50246 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: PrivateChat + whatsapp-web.js 1.18.4 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 1d966cc400..98c2ee29b1 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: PrivateContact + whatsapp-web.js 1.18.4 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 1605eadb21..63989aea3d 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Product + whatsapp-web.js 1.18.4 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index 61e0c4e8ac..2499d6e3ea 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Reaction + whatsapp-web.js 1.18.4 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 28a2eaebde..6d0db6c408 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: RemoteAuth + whatsapp-web.js 1.18.4 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index c9a03b019c..e612736af7 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Class: Util + whatsapp-web.js 1.18.4 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index dba1b7358f..b914c8f153 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.18.4 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 861fa78e62..d48570adb6 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.18.4 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index c8cd2ffcd4..ba4c6a68ea 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.18.4 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 65269ba77a..3ad238494f 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.18.4 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index 90965a2303..a9b865e106 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.18.4 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index 5c2a3328cc..e098ab7e1b 100644 --- a/docs/global.html +++ b/docs/global.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Globals + whatsapp-web.js 1.18.4 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index 3c0349bd30..875bafeb37 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Home + whatsapp-web.js 1.18.4 » Home @@ -15,7 +15,7 @@ @@ -27,11 +27,11 @@
-

npm Depfu WhatsApp_Web 2.2241.6 Discord Chat

+

npm Depfu WhatsApp_Web 2.2245.9 Discord Chat

whatsapp-web.js

A WhatsApp API client that connects through the WhatsApp Web browser app

It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

@@ -3276,7 +3276,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 84d94205b3..3f8c6f8dcf 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Base.js + whatsapp-web.js 1.18.4 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 5627b3a67c..1107174c47 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/BusinessContact.js + whatsapp-web.js 1.18.4 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 1555c38bd5..62185c1ad0 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Buttons.js + whatsapp-web.js 1.18.4 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 15ef35a35d..b67cda95f5 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Call.js + whatsapp-web.js 1.18.4 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index c6352d3754..e2f7f713d2 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Chat.js + whatsapp-web.js 1.18.4 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index eb40d8eaaf..a5386507a8 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/ClientInfo.js + whatsapp-web.js 1.18.4 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 52e76110a0..7ad3563c82 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Contact.js + whatsapp-web.js 1.18.4 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index e8757ac56c..bf4daa9e56 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/GroupChat.js + whatsapp-web.js 1.18.4 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -272,7 +272,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 0a924bdd0b..c3e48c52a9 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/GroupNotification.js + whatsapp-web.js 1.18.4 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 7caa8bcbd7..750c011138 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Label.js + whatsapp-web.js 1.18.4 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 3c787d8c31..61531b6bb5 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/List.js + whatsapp-web.js 1.18.4 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 202e68d8d5..a161277c8e 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Location.js + whatsapp-web.js 1.18.4 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 43e0e028df..adc947b6eb 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Message.js + whatsapp-web.js 1.18.4 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -336,8 +336,9 @@

Source: structures/Message.js

if (!this.hasQuotedMsg) return undefined; const quotedMsg = await this.client.pupPage.evaluate((msgId) => { - let msg = window.Store.Msg.get(msgId); - return msg.quotedMsgObj().serialize(); + const msg = window.Store.Msg.get(msgId); + const quotedMsg = window.Store.QuotedMsg.getQuotedMsgObj(msg); + return window.WWebJS.getMessageModel(quotedMsg); }, this.id._serialized); return new Message(this.client, quotedMsg); @@ -467,7 +468,8 @@

Source: structures/Message.js

await this.client.pupPage.evaluate((msgId, everyone) => { let msg = window.Store.Msg.get(msgId); - if (everyone &amp;&amp; msg._canRevoke()) { + const canRevoke = window.Store.MsgActionChecks.canSenderRevokeMsg(msg) || window.Store.MsgActionChecks.canAdminRevokeMsg(msg); + if (everyone &amp;&amp; canRevoke) { return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], { type: msg.id.fromMe ? 'Sender' : 'Admin' }); } @@ -482,7 +484,7 @@

Source: structures/Message.js

await this.client.pupPage.evaluate((msgId) => { let msg = window.Store.Msg.get(msgId); - if (msg.canStar()) { + if (window.Store.MsgActionChecks.canStarMsg(msg)) { return window.Store.Cmd.sendStarMsgs(msg.chat, [msg], false); } }, this.id._serialized); @@ -495,7 +497,7 @@

Source: structures/Message.js

await this.client.pupPage.evaluate((msgId) => { let msg = window.Store.Msg.get(msgId); - if (msg.canStar()) { + if (window.Store.MsgActionChecks.canStarMsg(msg)) { return window.Store.Cmd.sendUnstarMsgs(msg.chat, [msg], false); } }, this.id._serialized); @@ -569,7 +571,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 65b3615fb4..7518e5a0b7 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/MessageMedia.js + whatsapp-web.js 1.18.4 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 42a516912e..191f8125f4 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Order.js + whatsapp-web.js 1.18.4 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 41aafb1621..b118b402fc 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Payment.js + whatsapp-web.js 1.18.4 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 8d7d2a90d1..72c40a2d12 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/PrivateChat.js + whatsapp-web.js 1.18.4 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 88010e70e5..c0728786da 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/PrivateContact.js + whatsapp-web.js 1.18.4 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 6820848958..202d07eb35 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Product.js + whatsapp-web.js 1.18.4 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index 0c6dd41b91..730925a93f 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.18.4 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 21d744b9a5..2308bab862 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: structures/Reaction.js + whatsapp-web.js 1.18.4 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index e67ff21f50..ffc1ef92b7 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: util/Constants.js + whatsapp-web.js 1.18.4 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 394330aef2..2d18f566da 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: util/InterfaceController.js + whatsapp-web.js 1.18.4 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -160,7 +160,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index e66c61d21b..a35663a629 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.18.3 » Source: util/Util.js + whatsapp-web.js 1.18.4 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index 363e0d9e26..450d31fac2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.3", + "version": "1.18.4", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 288a572af6c4794cc6d28127d60327a176b929d4 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Thu, 22 Dec 2022 21:02:49 +0200 Subject: [PATCH 017/139] feat: Implement Call Rejection + Introduction of Socket API (#1882) * Initial stage * ESLint * eslint is annoying * fix: distinguish Wap from Socket's Wap --- index.d.ts | 3 +++ src/structures/Call.js | 10 +++++++++- src/util/Injected.js | 19 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 76ac264455..4da695ef8e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1326,6 +1326,9 @@ declare namespace WAWebJS { webClientShouldHandle: boolean, /** Object with participants */ participants: object + + /** Reject the call */ + reject: () => Promise } /** Message type List */ diff --git a/src/structures/Call.js b/src/structures/Call.js index 1e6644d1ba..0e48989d54 100644 --- a/src/structures/Call.js +++ b/src/structures/Call.js @@ -62,7 +62,15 @@ class Call extends Base { return super._patch(data); } - + + /** + * Reject the call + */ + async reject() { + return this.client.pupPage.evaluate((peerJid, id) => { + return window.WWebJS.rejectCall(peerJid, id); + }, this.from, this.id); + } } module.exports = Call; \ No newline at end of file diff --git a/src/util/Injected.js b/src/util/Injected.js index 7ece210aed..a0a7b12d65 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -53,6 +53,8 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.ReplyUtils = window.mR.findModule('canReplyMsg').length > 0 && window.mR.findModule('canReplyMsg')[0]; window.Store.MsgActionChecks = window.mR.findModule('canSenderRevokeMsg')[0]; window.Store.QuotedMsg = window.mR.findModule('getQuotedMsgObj')[0]; + window.Store.Socket = window.mR.findModule('deprecatedSendIq')[0]; + window.Store.SocketWap = window.mR.findModule('wap')[0]; window.Store.StickerTools = { ...window.mR.findModule('toWebpSticker')[0], ...window.mR.findModule('addWebpMetadata')[0] @@ -602,4 +604,21 @@ exports.LoadUtils = () => { return undefined; }; + + window.WWebJS.rejectCall = async (peerJid, id) => { + peerJid = peerJid.split('@')[0] + '@s.whatsapp.net'; + let userId = window.Store.User.getMaybeMeUser().user + '@s.whatsapp.net'; + const stanza = window.Store.SocketWap.wap('call', { + id: window.Store.SocketWap.generateId(), + from: window.Store.SocketWap.USER_JID(userId), + to: window.Store.SocketWap.USER_JID(peerJid), + }, [ + window.Store.SocketWap.wap('reject', { + 'call-id': id, + 'call-creator': window.Store.SocketWap.USER_JID(peerJid), + count: '0', + }) + ]); + await window.Store.Socket.deprecatedCastStanza(stanza); + }; }; From a7b77e15ed73a7f1901ead19ffa3060ec7fba5cf Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Fri, 23 Dec 2022 17:10:09 +0200 Subject: [PATCH 018/139] fix: Fix call event listener name + Added Call example (#1886) * fix: bugfix + example * relocate global variable --- example.js | 9 +++++++++ src/util/Constants.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/example.js b/example.js index 99dc7ea00c..9e5eec59c8 100644 --- a/example.js +++ b/example.js @@ -257,6 +257,15 @@ client.on('change_state', state => { console.log('CHANGE STATE', state ); }); +// Change to false if you don't want to reject incoming calls +let rejectCalls = true; + +client.on('call', async (call) => { + console.log('Call received, rejecting. GOTO Line 261 to disable', call); + if (rejectCalls) await call.reject(); + await client.sendMessage(call.from, `[${call.fromMe ? 'Outgoing' : 'Incoming'}] Phone call from ${call.from}, type ${call.isGroup ? 'group' : ''} ${call.isVideo ? 'video' : 'audio'} call. ${rejectCalls ? 'This call was automatically rejected by the script.' : ''}`); +}); + client.on('disconnected', (reason) => { console.log('Client was logged out', reason); }); diff --git a/src/util/Constants.js b/src/util/Constants.js index d062c7a28c..4c22fa138d 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -51,7 +51,7 @@ exports.Events = { DISCONNECTED: 'disconnected', STATE_CHANGED: 'change_state', BATTERY_CHANGED: 'change_battery', - INCOMING_CALL: 'incoming_call', + INCOMING_CALL: 'call', REMOTE_SESSION_SAVED: 'remote_session_saved' }; From 8655badc0f638530f42e22ed6b2bf3850bd520aa Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Wed, 4 Jan 2023 17:15:35 -0400 Subject: [PATCH 019/139] Create FUNDING.yml (#1901) * Create FUNDING.yml * Update README.md --- .github/FUNDING.yml | 3 +++ README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..4a3a1461c7 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +github: [pedroslopez, PurpShell] +ko_fi: pedroslopez +custom: ["paypal.me/psla", "buymeacoff.ee/pedroslopez"] diff --git a/README.md b/README.md index 3824f63406..242dc28d47 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ You can support the maintainer of this project through the links below - [Support via GitHub Sponsors](https://github.com/sponsors/pedroslopez) - [Support via PayPal](https://www.paypal.me/psla/) -- [Sign up for DigitalOcean](https://m.do.co/c/73f906a36ed4) and get $100 in credit when you sign up (Referral) +- [Sign up for DigitalOcean](https://m.do.co/c/73f906a36ed4) and get $200 in credit when you sign up (Referral) ## Disclaimer From 23d5147a142bd790adf891aa55107c272031cf76 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sun, 15 Jan 2023 14:30:20 -0400 Subject: [PATCH 020/139] fix: compatibility with LegacyPhoneFeatures in latest WhatsApp Web version (#1930) * fix removed features on latest wweb version * errors --- src/util/Injected.js | 6 +++++- src/util/InterfaceController.js | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index a0a7b12d65..e1f3871190 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -13,7 +13,6 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.Cmd = window.mR.findModule('Cmd')[0].Cmd; window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0]; window.Store.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager; - window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].LegacyPhoneFeatures; window.Store.GroupMetadata = window.mR.findModule('GroupMetadata')[0].default.GroupMetadata; window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0]; window.Store.InviteInfo = window.mR.findModule('sendQueryGroupInvite')[0]; @@ -87,6 +86,11 @@ exports.ExposeStore = (moduleRaidStr) => { } else { window.Store.MDBackend = true; } + + const _features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0]; + if(_features) { + window.Store.Features = _features.LegacyPhoneFeatures; + } }; exports.LoadUtils = () => { diff --git a/src/util/InterfaceController.js b/src/util/InterfaceController.js index 8a878f8cef..a87959da63 100644 --- a/src/util/InterfaceController.js +++ b/src/util/InterfaceController.js @@ -79,6 +79,7 @@ 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; }); } @@ -89,6 +90,7 @@ 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); }, feature); } @@ -99,6 +101,7 @@ 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'); for (const feature in features) { window.Store.Features.setFeature(features[feature], true); } @@ -111,6 +114,7 @@ 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'); for (const feature in features) { window.Store.Features.setFeature(features[feature], false); } From 7dd8688f048faad658a6718a57f83488421735da Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sun, 15 Jan 2023 20:32:28 +0200 Subject: [PATCH 021/139] fix: Fix client-side message rendering issue when sending attachements through the library (#1905) --- src/util/Injected.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/Injected.js b/src/util/Injected.js index e1f3871190..bc05602ba0 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -271,6 +271,7 @@ exports.LoadUtils = () => { ...ephemeralFields, ...locationOptions, ...attOptions, + ...(Object.keys(attOptions).length > 0 ? attOptions.toJSON() : {}), ...quotedMsgOptions, ...vcardOptions, ...buttonOptions, From bd0e27a0d0bd387409bf74432240c129eb937ca0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Jan 2023 14:34:23 -0400 Subject: [PATCH 022/139] Update supported WhatsApp Web version to v2.2301.6 (#1869) Co-authored-by: pedroslopez --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 242dc28d47..54c439b19e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2245.9](https://img.shields.io/badge/WhatsApp_Web-2.2245.9-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2301.6](https://img.shields.io/badge/WhatsApp_Web-2.2301.6-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index 53ab36c0b5..07e78805ef 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2245.9 \ No newline at end of file +2.2301.6 \ No newline at end of file From bd192993b7369feacd82ecef551eeaa61fea658d Mon Sep 17 00:00:00 2001 From: tofers Date: Sun, 15 Jan 2023 21:35:26 +0300 Subject: [PATCH 023/139] fix method downloadMedia when not found msg (#1852) Co-authored-by: Rajeh Taher --- src/structures/Message.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index ee79c20177..7ac55366d4 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -386,7 +386,9 @@ class Message extends Base { const result = await this.client.pupPage.evaluate(async (msgId) => { const msg = window.Store.Msg.get(msgId); - + if (!msg) { + return undefined; + } if (msg.mediaData.mediaStage != 'RESOLVED') { // try to resolve media await msg.downloadMedia({ From a525e2330a917981f1af00e1c582f56e6d20caea Mon Sep 17 00:00:00 2001 From: Azeem Haider Date: Sun, 15 Jan 2023 23:36:08 +0500 Subject: [PATCH 024/139] Adding missing CALL in events enum (#1899) --- index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 4da695ef8e..6abef660cd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -506,7 +506,8 @@ declare namespace WAWebJS { DISCONNECTED = 'disconnected', STATE_CHANGED = 'change_state', BATTERY_CHANGED = 'change_battery', - REMOTE_SESSION_SAVED = 'remote_session_saved' + REMOTE_SESSION_SAVED = 'remote_session_saved', + CALL = 'call' } /** Group notification types */ From d2479f397e482da097cfe0f0544f2ee981febc59 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sun, 15 Jan 2023 14:38:46 -0400 Subject: [PATCH 025/139] chore: mark version v1.19.0 --- docs/Base.html | 6 ++-- docs/BaseAuthStrategy.html | 6 ++-- docs/BusinessContact.html | 6 ++-- docs/Buttons.html | 6 ++-- docs/Call.html | 30 +++++++++++++++++-- docs/Chat.html | 6 ++-- docs/Client.html | 6 ++-- docs/Client.js.html | 6 ++-- docs/ClientInfo.html | 6 ++-- docs/Contact.html | 6 ++-- docs/GroupChat.html | 6 ++-- docs/GroupNotification.html | 6 ++-- docs/InterfaceController.html | 6 ++-- docs/Label.html | 6 ++-- docs/LegacySessionAuth.html | 6 ++-- docs/List.html | 6 ++-- docs/LocalAuth.html | 6 ++-- docs/Location.html | 6 ++-- docs/Message.html | 6 ++-- docs/MessageMedia.html | 6 ++-- docs/NoAuth.html | 6 ++-- docs/Order.html | 6 ++-- docs/PrivateChat.html | 6 ++-- docs/PrivateContact.html | 6 ++-- docs/Product.html | 6 ++-- docs/Reaction.html | 6 ++-- docs/RemoteAuth.html | 6 ++-- docs/Util.html | 6 ++-- docs/authStrategies_BaseAuthStrategy.js.html | 6 ++-- docs/authStrategies_LegacySessionAuth.js.html | 6 ++-- docs/authStrategies_LocalAuth.js.html | 6 ++-- docs/authStrategies_NoAuth.js.html | 6 ++-- docs/authStrategies_RemoteAuth.js.html | 6 ++-- docs/global.html | 6 ++-- docs/index.html | 17 +++++++---- docs/structures_Base.js.html | 6 ++-- docs/structures_BusinessContact.js.html | 6 ++-- docs/structures_Buttons.js.html | 6 ++-- docs/structures_Call.js.html | 16 +++++++--- docs/structures_Chat.js.html | 6 ++-- docs/structures_ClientInfo.js.html | 6 ++-- docs/structures_Contact.js.html | 6 ++-- docs/structures_GroupChat.js.html | 6 ++-- docs/structures_GroupNotification.js.html | 6 ++-- docs/structures_Label.js.html | 6 ++-- docs/structures_List.js.html | 6 ++-- docs/structures_Location.js.html | 6 ++-- docs/structures_Message.js.html | 10 ++++--- docs/structures_MessageMedia.js.html | 6 ++-- docs/structures_Order.js.html | 6 ++-- docs/structures_Payment.js.html | 6 ++-- docs/structures_PrivateChat.js.html | 6 ++-- docs/structures_PrivateContact.js.html | 6 ++-- docs/structures_Product.js.html | 6 ++-- docs/structures_ProductMetadata.js.html | 6 ++-- docs/structures_Reaction.js.html | 6 ++-- docs/util_Constants.js.html | 8 ++--- docs/util_InterfaceController.js.html | 10 +++++-- docs/util_Util.js.html | 6 ++-- package.json | 2 +- 60 files changed, 227 insertions(+), 184 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 53e15f4549..6d4df28f89 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Base + whatsapp-web.js 1.19.0 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 88de5bb66e..d73f022c77 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: BaseAuthStrategy + whatsapp-web.js 1.19.0 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 3269010944..fa8ffff1c2 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: BusinessContact + whatsapp-web.js 1.19.0 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index f619730250..aea422971e 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Buttons + whatsapp-web.js 1.19.0 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 1f049398bf..532867a65e 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Call + whatsapp-web.js 1.19.0 » Class: Call @@ -15,7 +15,7 @@ @@ -78,6 +78,22 @@

Properties

+
+

Method

+
+
+
+
reject()
+
+
+
+
+
+
+
+
+
+

new Call()

@@ -135,6 +151,14 @@

webClientShouldHandle

+

Method

+
+
async
+

reject()

+

Reject the call

+
+
+
@@ -144,7 +168,7 @@

webClientShouldHandle diff --git a/docs/Chat.html b/docs/Chat.html index 3efe708175..7ef6426f02 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Chat + whatsapp-web.js 1.19.0 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 60a721719a..3d5be243cb 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Client + whatsapp-web.js 1.19.0 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index 8a16378dd1..17a955ef70 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: Client.js + whatsapp-web.js 1.19.0 » Source: Client.js @@ -15,7 +15,7 @@ @@ -1224,7 +1224,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index f9976b7fc2..b6e3a0b978 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: ClientInfo + whatsapp-web.js 1.19.0 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index 515e13b532..3f0658d24f 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Contact + whatsapp-web.js 1.19.0 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index e00d4eaade..2ae8fbc733 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: GroupChat + whatsapp-web.js 1.19.0 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index aa4a01c063..eb482e8048 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: GroupNotification + whatsapp-web.js 1.19.0 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 8b97ada245..33c243dffd 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: InterfaceController + whatsapp-web.js 1.19.0 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index 7a429f64c0..e7361d9876 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Label + whatsapp-web.js 1.19.0 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 65dfb467f4..38af38191a 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: LegacySessionAuth + whatsapp-web.js 1.19.0 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index 2033a98e78..22880df9f4 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: List + whatsapp-web.js 1.19.0 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 2b8c83eb8f..65ecb37170 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: LocalAuth + whatsapp-web.js 1.19.0 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index 7714777e4a..67a7582368 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Location + whatsapp-web.js 1.19.0 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index d63f606fe0..071506d36a 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Message + whatsapp-web.js 1.19.0 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 4213281980..980a53fc57 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: MessageMedia + whatsapp-web.js 1.19.0 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 178c61e00c..04b3c9fc4d 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: NoAuth + whatsapp-web.js 1.19.0 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index 7cc642974a..d25e1f2127 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Order + whatsapp-web.js 1.19.0 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 8317e50246..abe558c965 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: PrivateChat + whatsapp-web.js 1.19.0 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 98c2ee29b1..8987daa02b 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: PrivateContact + whatsapp-web.js 1.19.0 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 63989aea3d..896000f469 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Product + whatsapp-web.js 1.19.0 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index 2499d6e3ea..6e7df361da 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Reaction + whatsapp-web.js 1.19.0 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 6d0db6c408..e37622a606 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: RemoteAuth + whatsapp-web.js 1.19.0 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index e612736af7..cba7d45f18 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Class: Util + whatsapp-web.js 1.19.0 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index b914c8f153..4417f6bb89 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.19.0 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index d48570adb6..60dfe747a3 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.19.0 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index ba4c6a68ea..c8aa59f413 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.19.0 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 3ad238494f..ecd9625272 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.19.0 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index a9b865e106..1d5b67f54c 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.19.0 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index e098ab7e1b..c88dfaa7ab 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Globals + whatsapp-web.js 1.19.0 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index 875bafeb37..8687453e27 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Home + whatsapp-web.js 1.19.0 » Home @@ -15,7 +15,7 @@ @@ -27,11 +27,11 @@
-

npm Depfu WhatsApp_Web 2.2245.9 Discord Chat

+

npm Depfu WhatsApp_Web 2.2301.6 Discord Chat

whatsapp-web.js

A WhatsApp API client that connects through the WhatsApp Web browser app

It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

@@ -197,7 +197,7 @@

Supporting the project

Disclaimer

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.

@@ -498,6 +498,11 @@

Call

+
+ Call#reject() +
+
+
Call#timestamp
@@ -3276,7 +3281,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 3f8c6f8dcf..66418ba951 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Base.js + whatsapp-web.js 1.19.0 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 1107174c47..0924cc27b2 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/BusinessContact.js + whatsapp-web.js 1.19.0 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 62185c1ad0..9cbf169dee 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Buttons.js + whatsapp-web.js 1.19.0 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index b67cda95f5..2ceb625a59 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Call.js + whatsapp-web.js 1.19.0 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -93,7 +93,15 @@

Source: structures/Call.js

return super._patch(data); } - + + /** + * Reject the call + */ + async reject() { + return this.client.pupPage.evaluate((peerJid, id) => { + return window.WWebJS.rejectCall(peerJid, id); + }, this.from, this.id); + } } module.exports = Call; @@ -106,7 +114,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index e2f7f713d2..2cee8f87ce 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Chat.js + whatsapp-web.js 1.19.0 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index a5386507a8..1055ab66bb 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/ClientInfo.js + whatsapp-web.js 1.19.0 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 7ad3563c82..4cbed822bb 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Contact.js + whatsapp-web.js 1.19.0 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index bf4daa9e56..af108d3c0a 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/GroupChat.js + whatsapp-web.js 1.19.0 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -272,7 +272,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index c3e48c52a9..2f982a8d92 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/GroupNotification.js + whatsapp-web.js 1.19.0 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 750c011138..4c94add33a 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Label.js + whatsapp-web.js 1.19.0 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 61531b6bb5..9c8c20a58e 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/List.js + whatsapp-web.js 1.19.0 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index a161277c8e..3fef82f557 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Location.js + whatsapp-web.js 1.19.0 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index adc947b6eb..e8dc63511f 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Message.js + whatsapp-web.js 1.19.0 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -417,7 +417,9 @@

Source: structures/Message.js

const result = await this.client.pupPage.evaluate(async (msgId) => { const msg = window.Store.Msg.get(msgId); - + if (!msg) { + return undefined; + } if (msg.mediaData.mediaStage != 'RESOLVED') { // try to resolve media await msg.downloadMedia({ @@ -571,7 +573,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 7518e5a0b7..0b220cd94f 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/MessageMedia.js + whatsapp-web.js 1.19.0 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 191f8125f4..497111543f 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Order.js + whatsapp-web.js 1.19.0 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index b118b402fc..9399cfdda5 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Payment.js + whatsapp-web.js 1.19.0 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 72c40a2d12..cdba2e7481 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/PrivateChat.js + whatsapp-web.js 1.19.0 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index c0728786da..a9adad1803 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/PrivateContact.js + whatsapp-web.js 1.19.0 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 202d07eb35..d5e4996201 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Product.js + whatsapp-web.js 1.19.0 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index 730925a93f..5b035fd3ea 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.19.0 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 2308bab862..828d26c402 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: structures/Reaction.js + whatsapp-web.js 1.19.0 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index ffc1ef92b7..d344f3c8c7 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: util/Constants.js + whatsapp-web.js 1.19.0 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -82,7 +82,7 @@

Source: util/Constants.js

DISCONNECTED: 'disconnected', STATE_CHANGED: 'change_state', BATTERY_CHANGED: 'change_battery', - INCOMING_CALL: 'incoming_call', + INCOMING_CALL: 'call', REMOTE_SESSION_SAVED: 'remote_session_saved' }; @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 2d18f566da..442064e886 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: util/InterfaceController.js + whatsapp-web.js 1.19.0 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -110,6 +110,7 @@

Source: util/InterfaceController.js

*/ 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; }); } @@ -120,6 +121,7 @@

Source: util/InterfaceController.js

*/ 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); }, feature); } @@ -130,6 +132,7 @@

Source: util/InterfaceController.js

*/ async enableFeatures(features) { await this.pupPage.evaluate((features) => { + if(!window.Store.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); } @@ -142,6 +145,7 @@

Source: util/InterfaceController.js

*/ async disableFeatures(features) { await this.pupPage.evaluate((features) => { + if(!window.Store.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); } @@ -160,7 +164,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index a35663a629..60e966f451 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.18.4 » Source: util/Util.js + whatsapp-web.js 1.19.0 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index 450d31fac2..366aa7c78a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.18.4", + "version": "1.19.0", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From e1917494bf44fa77a77b1156cb042b43f7d58adf Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sun, 15 Jan 2023 14:54:50 -0400 Subject: [PATCH 026/139] Revert "fix: Fix client-side message rendering issue when sending attachements through the library (#1905)" (#1932) This reverts commit 7dd8688f048faad658a6718a57f83488421735da. --- src/util/Injected.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index bc05602ba0..e1f3871190 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -271,7 +271,6 @@ exports.LoadUtils = () => { ...ephemeralFields, ...locationOptions, ...attOptions, - ...(Object.keys(attOptions).length > 0 ? attOptions.toJSON() : {}), ...quotedMsgOptions, ...vcardOptions, ...buttonOptions, From 1e3374f0cd4fc5ba28b8611336f8ada36aa16be8 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sun, 15 Jan 2023 14:55:28 -0400 Subject: [PATCH 027/139] chore: mark version v1.19.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 366aa7c78a..a396b2db4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.19.0", + "version": "1.19.1", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 698305f66882f3ef8c37cdcf7ca0daee45dac9fb Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sun, 15 Jan 2023 14:56:00 -0400 Subject: [PATCH 028/139] update docs for 1.19.1 --- docs/Base.html | 4 ++-- docs/BaseAuthStrategy.html | 4 ++-- docs/BusinessContact.html | 4 ++-- docs/Buttons.html | 4 ++-- docs/Call.html | 4 ++-- docs/Chat.html | 4 ++-- docs/Client.html | 4 ++-- docs/Client.js.html | 4 ++-- docs/ClientInfo.html | 4 ++-- docs/Contact.html | 4 ++-- docs/GroupChat.html | 4 ++-- docs/GroupNotification.html | 4 ++-- docs/InterfaceController.html | 4 ++-- docs/Label.html | 4 ++-- docs/LegacySessionAuth.html | 4 ++-- docs/List.html | 4 ++-- docs/LocalAuth.html | 4 ++-- docs/Location.html | 4 ++-- docs/Message.html | 4 ++-- docs/MessageMedia.html | 4 ++-- docs/NoAuth.html | 4 ++-- docs/Order.html | 4 ++-- docs/PrivateChat.html | 4 ++-- docs/PrivateContact.html | 4 ++-- docs/Product.html | 4 ++-- docs/Reaction.html | 4 ++-- docs/RemoteAuth.html | 4 ++-- docs/Util.html | 4 ++-- docs/authStrategies_BaseAuthStrategy.js.html | 4 ++-- docs/authStrategies_LegacySessionAuth.js.html | 4 ++-- docs/authStrategies_LocalAuth.js.html | 4 ++-- docs/authStrategies_NoAuth.js.html | 4 ++-- docs/authStrategies_RemoteAuth.js.html | 4 ++-- docs/global.html | 4 ++-- docs/index.html | 6 +++--- docs/structures_Base.js.html | 4 ++-- docs/structures_BusinessContact.js.html | 4 ++-- docs/structures_Buttons.js.html | 4 ++-- docs/structures_Call.js.html | 4 ++-- docs/structures_Chat.js.html | 4 ++-- docs/structures_ClientInfo.js.html | 4 ++-- docs/structures_Contact.js.html | 4 ++-- docs/structures_GroupChat.js.html | 4 ++-- docs/structures_GroupNotification.js.html | 4 ++-- docs/structures_Label.js.html | 4 ++-- docs/structures_List.js.html | 4 ++-- docs/structures_Location.js.html | 4 ++-- docs/structures_Message.js.html | 4 ++-- docs/structures_MessageMedia.js.html | 4 ++-- docs/structures_Order.js.html | 4 ++-- docs/structures_Payment.js.html | 4 ++-- docs/structures_PrivateChat.js.html | 4 ++-- docs/structures_PrivateContact.js.html | 4 ++-- docs/structures_Product.js.html | 4 ++-- docs/structures_ProductMetadata.js.html | 4 ++-- docs/structures_Reaction.js.html | 4 ++-- docs/util_Constants.js.html | 4 ++-- docs/util_InterfaceController.js.html | 4 ++-- docs/util_Util.js.html | 4 ++-- 59 files changed, 119 insertions(+), 119 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 6d4df28f89..405ceda088 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Base + whatsapp-web.js 1.19.1 » Class: Base @@ -15,7 +15,7 @@ diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index d73f022c77..7e45bbdd5c 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: BaseAuthStrategy + whatsapp-web.js 1.19.1 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index fa8ffff1c2..a009637895 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: BusinessContact + whatsapp-web.js 1.19.1 » Class: BusinessContact @@ -15,7 +15,7 @@ diff --git a/docs/Buttons.html b/docs/Buttons.html index aea422971e..eda638764e 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Buttons + whatsapp-web.js 1.19.1 » Class: Buttons @@ -15,7 +15,7 @@ diff --git a/docs/Call.html b/docs/Call.html index 532867a65e..5bf102ce40 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Call + whatsapp-web.js 1.19.1 » Class: Call @@ -15,7 +15,7 @@ diff --git a/docs/Chat.html b/docs/Chat.html index 7ef6426f02..58d67b0c86 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Chat + whatsapp-web.js 1.19.1 » Class: Chat @@ -15,7 +15,7 @@ diff --git a/docs/Client.html b/docs/Client.html index 3d5be243cb..de09c4a7e7 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Client + whatsapp-web.js 1.19.1 » Class: Client @@ -15,7 +15,7 @@ diff --git a/docs/Client.js.html b/docs/Client.js.html index 17a955ef70..e3e7bb4bdf 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: Client.js + whatsapp-web.js 1.19.1 » Source: Client.js @@ -15,7 +15,7 @@ diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index b6e3a0b978..2653b0ccdd 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: ClientInfo + whatsapp-web.js 1.19.1 » Class: ClientInfo @@ -15,7 +15,7 @@ diff --git a/docs/Contact.html b/docs/Contact.html index 3f0658d24f..3144b3afcc 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Contact + whatsapp-web.js 1.19.1 » Class: Contact @@ -15,7 +15,7 @@ diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 2ae8fbc733..9cabfa227c 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: GroupChat + whatsapp-web.js 1.19.1 » Class: GroupChat @@ -15,7 +15,7 @@ diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index eb482e8048..419bcf981a 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: GroupNotification + whatsapp-web.js 1.19.1 » Class: GroupNotification @@ -15,7 +15,7 @@ diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 33c243dffd..2d73cf874e 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: InterfaceController + whatsapp-web.js 1.19.1 » Class: InterfaceController @@ -15,7 +15,7 @@ diff --git a/docs/Label.html b/docs/Label.html index e7361d9876..578779f070 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Label + whatsapp-web.js 1.19.1 » Class: Label @@ -15,7 +15,7 @@ diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 38af38191a..833f2c400a 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: LegacySessionAuth + whatsapp-web.js 1.19.1 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ diff --git a/docs/List.html b/docs/List.html index 22880df9f4..ead1c22003 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: List + whatsapp-web.js 1.19.1 » Class: List @@ -15,7 +15,7 @@ diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 65ecb37170..54cb42a7e8 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: LocalAuth + whatsapp-web.js 1.19.1 » Class: LocalAuth @@ -15,7 +15,7 @@ diff --git a/docs/Location.html b/docs/Location.html index 67a7582368..fd1926c792 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Location + whatsapp-web.js 1.19.1 » Class: Location @@ -15,7 +15,7 @@ diff --git a/docs/Message.html b/docs/Message.html index 071506d36a..17825457f4 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Message + whatsapp-web.js 1.19.1 » Class: Message @@ -15,7 +15,7 @@ diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 980a53fc57..33359d362c 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: MessageMedia + whatsapp-web.js 1.19.1 » Class: MessageMedia @@ -15,7 +15,7 @@ diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 04b3c9fc4d..119126acf1 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: NoAuth + whatsapp-web.js 1.19.1 » Class: NoAuth @@ -15,7 +15,7 @@ diff --git a/docs/Order.html b/docs/Order.html index d25e1f2127..ea747c4655 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Order + whatsapp-web.js 1.19.1 » Class: Order @@ -15,7 +15,7 @@ diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index abe558c965..f38ad1e596 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: PrivateChat + whatsapp-web.js 1.19.1 » Class: PrivateChat @@ -15,7 +15,7 @@ diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 8987daa02b..3473ea0378 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: PrivateContact + whatsapp-web.js 1.19.1 » Class: PrivateContact @@ -15,7 +15,7 @@ diff --git a/docs/Product.html b/docs/Product.html index 896000f469..457f833d6e 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Product + whatsapp-web.js 1.19.1 » Class: Product @@ -15,7 +15,7 @@ diff --git a/docs/Reaction.html b/docs/Reaction.html index 6e7df361da..0517004149 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Reaction + whatsapp-web.js 1.19.1 » Class: Reaction @@ -15,7 +15,7 @@ diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index e37622a606..5f1baa776c 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: RemoteAuth + whatsapp-web.js 1.19.1 » Class: RemoteAuth @@ -15,7 +15,7 @@ diff --git a/docs/Util.html b/docs/Util.html index cba7d45f18..5083b76f00 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Class: Util + whatsapp-web.js 1.19.1 » Class: Util @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 4417f6bb89..2db95235c7 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.19.1 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 60dfe747a3..ed0343d79d 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.19.1 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index c8aa59f413..63203666d6 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.19.1 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index ecd9625272..1be866f9f9 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.19.1 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index 1d5b67f54c..f7f48d2e62 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.19.1 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/global.html b/docs/global.html index c88dfaa7ab..f599dc79d4 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Globals + whatsapp-web.js 1.19.1 » Globals @@ -15,7 +15,7 @@ diff --git a/docs/index.html b/docs/index.html index 8687453e27..7b3457e400 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Home + whatsapp-web.js 1.19.1 » Home @@ -15,7 +15,7 @@ @@ -27,7 +27,7 @@
diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 66418ba951..4e70ed72a1 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Base.js + whatsapp-web.js 1.19.1 » Source: structures/Base.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 0924cc27b2..e7600cd55b 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/BusinessContact.js + whatsapp-web.js 1.19.1 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 9cbf169dee..3a79b8d5c3 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Buttons.js + whatsapp-web.js 1.19.1 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 2ceb625a59..2c64c0a94f 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Call.js + whatsapp-web.js 1.19.1 » Source: structures/Call.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 2cee8f87ce..0fab4cbc11 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Chat.js + whatsapp-web.js 1.19.1 » Source: structures/Chat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 1055ab66bb..4c205c7623 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/ClientInfo.js + whatsapp-web.js 1.19.1 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 4cbed822bb..2da12453e5 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Contact.js + whatsapp-web.js 1.19.1 » Source: structures/Contact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index af108d3c0a..7635f2ea86 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/GroupChat.js + whatsapp-web.js 1.19.1 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 2f982a8d92..882f1cd178 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/GroupNotification.js + whatsapp-web.js 1.19.1 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 4c94add33a..84fe4a5982 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Label.js + whatsapp-web.js 1.19.1 » Source: structures/Label.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 9c8c20a58e..5b90208038 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/List.js + whatsapp-web.js 1.19.1 » Source: structures/List.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 3fef82f557..5d66947c06 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Location.js + whatsapp-web.js 1.19.1 » Source: structures/Location.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index e8dc63511f..0c4d051282 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Message.js + whatsapp-web.js 1.19.1 » Source: structures/Message.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 0b220cd94f..499f7cfb6b 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/MessageMedia.js + whatsapp-web.js 1.19.1 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 497111543f..9ad5d7ec72 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Order.js + whatsapp-web.js 1.19.1 » Source: structures/Order.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 9399cfdda5..e934dd14b0 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Payment.js + whatsapp-web.js 1.19.1 » Source: structures/Payment.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index cdba2e7481..b7af145730 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/PrivateChat.js + whatsapp-web.js 1.19.1 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index a9adad1803..7aec0d9865 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/PrivateContact.js + whatsapp-web.js 1.19.1 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index d5e4996201..9e78871cf3 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Product.js + whatsapp-web.js 1.19.1 » Source: structures/Product.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index 5b035fd3ea..ba7f554f2b 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.19.1 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 828d26c402..6b47024739 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: structures/Reaction.js + whatsapp-web.js 1.19.1 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index d344f3c8c7..12a26d5159 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: util/Constants.js + whatsapp-web.js 1.19.1 » Source: util/Constants.js @@ -15,7 +15,7 @@ diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 442064e886..02b7dc3b3d 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: util/InterfaceController.js + whatsapp-web.js 1.19.1 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index 60e966f451..5f19a8f839 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.0 » Source: util/Util.js + whatsapp-web.js 1.19.1 » Source: util/Util.js @@ -15,7 +15,7 @@ From 70f2391d51c6684dc22b84d7518b9ea9482ab83e Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Sun, 15 Jan 2023 17:59:20 -0400 Subject: [PATCH 029/139] fix group methods (#1934) * fix: create group * fix set group subject, description, properties; exit group * fix participant methods * fix return type * fix invite methods --- src/Client.js | 18 +++++----- src/structures/GroupChat.js | 70 ++++++++++++++++++++++++------------- src/util/Injected.js | 12 +++---- 3 files changed, 60 insertions(+), 40 deletions(-) diff --git a/src/Client.js b/src/Client.js index d3c9bb42df..7a09d7a8d9 100644 --- a/src/Client.js +++ b/src/Client.js @@ -774,7 +774,7 @@ class Client extends EventEmitter { */ async getInviteInfo(inviteCode) { return await this.pupPage.evaluate(inviteCode => { - return window.Store.InviteInfo.sendQueryGroupInvite(inviteCode); + return window.Store.InviteInfo.queryGroupInvite(inviteCode); }, inviteCode); } @@ -784,11 +784,11 @@ class Client extends EventEmitter { * @returns {Promise} Id of the joined Chat */ async acceptInvite(inviteCode) { - const chatId = await this.pupPage.evaluate(async inviteCode => { - return await window.Store.Invite.sendJoinGroupViaInvite(inviteCode); + const res = await this.pupPage.evaluate(async inviteCode => { + return await window.Store.Invite.joinGroupViaInvite(inviteCode); }, inviteCode); - return chatId._serialized; + return res.gid._serialized; } /** @@ -1095,19 +1095,17 @@ class Client extends EventEmitter { const createRes = await this.pupPage.evaluate(async (name, participantIds) => { const participantWIDs = participantIds.map(p => window.Store.WidFactory.createWid(p)); - const id = window.Store.MsgKey.newId(); - const res = await window.Store.GroupUtils.sendCreateGroup(name, participantWIDs, undefined, id); - return res; + return await window.Store.GroupUtils.createGroup(name, participantWIDs, 0); }, name, participants); const missingParticipants = createRes.participants.reduce(((missing, c) => { - const id = Object.keys(c)[0]; - const statusCode = c[id].code; + const id = c.wid._serialized; + const statusCode = c.error ? c.error.toString() : '200'; if (statusCode != 200) return Object.assign(missing, { [id]: statusCode }); return missing; }), {}); - return { gid: createRes.gid, missingParticipants }; + return { gid: createRes.wid, missingParticipants }; } /** diff --git a/src/structures/GroupChat.js b/src/structures/GroupChat.js index c11f5a9784..0be6b62e10 100644 --- a/src/structures/GroupChat.js +++ b/src/structures/GroupChat.js @@ -59,10 +59,15 @@ class GroupChat extends Chat { * @returns {Promise} */ async addParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendAddParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = await Promise.all(participantIds.map(async p => { + const wid = window.Store.WidFactory.createWid(p); + return await window.Store.Contact.get(wid); + })); + await window.Store.GroupParticipants.addParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -72,10 +77,14 @@ class GroupChat extends Chat { * @returns {Promise} */ async removeParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendRemoveParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = participantIds.map(p => { + return chat.groupMetadata.participants.get(p); + }).filter(p => Boolean(p)); + await window.Store.GroupParticipants.removeParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -85,10 +94,14 @@ class GroupChat extends Chat { * @returns {Promise<{ status: number }>} Object with status code indicating if the operation was successful */ async promoteParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendPromoteParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = participantIds.map(p => { + return chat.groupMetadata.participants.get(p); + }).filter(p => Boolean(p)); + await window.Store.GroupParticipants.promoteParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -98,10 +111,14 @@ class GroupChat extends Chat { * @returns {Promise<{ status: number }>} Object with status code indicating if the operation was successful */ async demoteParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendDemoteParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = participantIds.map(p => { + return chat.groupMetadata.participants.get(p); + }).filter(p => Boolean(p)); + await window.Store.GroupParticipants.demoteParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -114,7 +131,8 @@ class GroupChat extends Chat { const success = await this.client.pupPage.evaluate(async (chatId, subject) => { const chatWid = window.Store.WidFactory.createWid(chatId); try { - return await window.Store.GroupUtils.sendSetGroupSubject(chatWid, subject); + await window.Store.GroupUtils.setGroupSubject(chatWid, subject); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -136,7 +154,8 @@ class GroupChat extends Chat { const chatWid = window.Store.WidFactory.createWid(chatId); let descId = window.Store.GroupMetadata.get(chatWid).descId; try { - return await window.Store.GroupUtils.sendSetGroupDescription(chatWid, description, window.Store.MsgKey.newId(), descId); + await window.Store.GroupUtils.setGroupDescription(chatWid, description, window.Store.MsgKey.newId(), descId); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -157,7 +176,8 @@ class GroupChat extends Chat { const success = await this.client.pupPage.evaluate(async (chatId, adminsOnly) => { const chatWid = window.Store.WidFactory.createWid(chatId); try { - return await window.Store.GroupUtils.sendSetGroupProperty(chatWid, 'announcement', adminsOnly ? 1 : 0); + await window.Store.GroupUtils.setGroupProperty(chatWid, 'announcement', adminsOnly ? 1 : 0); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -179,7 +199,8 @@ class GroupChat extends Chat { const success = await this.client.pupPage.evaluate(async (chatId, adminsOnly) => { const chatWid = window.Store.WidFactory.createWid(chatId); try { - return await window.Store.GroupUtils.sendSetGroupProperty(chatWid, 'restrict', adminsOnly ? 1 : 0); + await window.Store.GroupUtils.setGroupProperty(chatWid, 'restrict', adminsOnly ? 1 : 0); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -197,12 +218,12 @@ class GroupChat extends Chat { * @returns {Promise} Group's invite code */ async getInviteCode() { - const code = await this.client.pupPage.evaluate(async chatId => { + const codeRes = await this.client.pupPage.evaluate(async chatId => { const chatWid = window.Store.WidFactory.createWid(chatId); - return window.Store.Invite.sendQueryGroupInviteCode(chatWid); + return window.Store.Invite.queryGroupInviteCode(chatWid); }, this.id._serialized); - return code; + return codeRes.code; } /** @@ -210,12 +231,12 @@ class GroupChat extends Chat { * @returns {Promise} New invite code */ async revokeInvite() { - const code = await this.client.pupPage.evaluate(chatId => { + const codeRes = await this.client.pupPage.evaluate(chatId => { const chatWid = window.Store.WidFactory.createWid(chatId); - return window.Store.Invite.sendRevokeGroupInviteCode(chatWid); + return window.Store.Invite.resetGroupInviteCode(chatWid); }, this.id._serialized); - return code; + return codeRes.code; } /** @@ -223,9 +244,10 @@ class GroupChat extends Chat { * @returns {Promise} */ async leave() { - await this.client.pupPage.evaluate(chatId => { + await this.client.pupPage.evaluate(async chatId => { const chatWid = window.Store.WidFactory.createWid(chatId); - return window.Store.GroupUtils.sendExitGroup(chatWid); + const chat = await window.Store.Chat.find(chatWid); + return window.Store.GroupUtils.sendExitGroup(chat); }, this.id._serialized); } diff --git a/src/util/Injected.js b/src/util/Injected.js index e1f3871190..7acc145681 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -14,8 +14,8 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0]; window.Store.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager; window.Store.GroupMetadata = window.mR.findModule('GroupMetadata')[0].default.GroupMetadata; - window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0]; - window.Store.InviteInfo = window.mR.findModule('sendQueryGroupInvite')[0]; + window.Store.Invite = window.mR.findModule('resetGroupInviteCode')[0]; + window.Store.InviteInfo = window.mR.findModule('queryGroupInvite')[0]; window.Store.Label = window.mR.findModule('LabelCollection')[0].LabelCollection; window.Store.MediaPrep = window.mR.findModule('MediaPrep')[0]; window.Store.MediaObject = window.mR.findModule('getOrCreateMediaObject')[0]; @@ -41,7 +41,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.ProfilePic = window.mR.findModule('profilePicResync')[0]; window.Store.PresenceUtils = window.mR.findModule('sendPresenceAvailable')[0]; window.Store.ChatState = window.mR.findModule('sendChatStateComposing')[0]; - window.Store.GroupParticipants = window.mR.findModule('sendPromoteParticipants')[0]; + window.Store.GroupParticipants = window.mR.findModule('promoteParticipants')[1]; window.Store.JoinInviteV4 = window.mR.findModule('sendJoinGroupViaInviteV4')[0]; window.Store.findCommonGroups = window.mR.findModule('findCommonGroups')[0].findCommonGroups; window.Store.StatusUtils = window.mR.findModule('setMyStatus')[0]; @@ -60,9 +60,9 @@ exports.ExposeStore = (moduleRaidStr) => { }; window.Store.GroupUtils = { - ...window.mR.findModule('sendCreateGroup')[0], - ...window.mR.findModule('sendSetGroupSubject')[0], - ...window.mR.findModule('markExited')[0] + ...window.mR.findModule('createGroup')[0], + ...window.mR.findModule('setGroupDescription')[0], + ...window.mR.findModule('sendExitGroup')[0] }; if (!window.Store.Chat._find) { From 6cead95f3c08403a0ad5c49e3a2508e3fb45dc14 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sun, 15 Jan 2023 18:00:25 -0400 Subject: [PATCH 030/139] chore: mark version v1.19.2 --- docs/Base.html | 4 +- docs/BaseAuthStrategy.html | 4 +- docs/BusinessContact.html | 4 +- docs/Buttons.html | 4 +- docs/Call.html | 4 +- docs/Chat.html | 4 +- docs/Client.html | 4 +- docs/Client.js.html | 22 +++--- docs/ClientInfo.html | 4 +- docs/Contact.html | 4 +- docs/GroupChat.html | 4 +- docs/GroupNotification.html | 4 +- docs/InterfaceController.html | 4 +- docs/Label.html | 4 +- docs/LegacySessionAuth.html | 4 +- docs/List.html | 4 +- docs/LocalAuth.html | 4 +- docs/Location.html | 4 +- docs/Message.html | 4 +- docs/MessageMedia.html | 4 +- docs/NoAuth.html | 4 +- docs/Order.html | 4 +- docs/PrivateChat.html | 4 +- docs/PrivateContact.html | 4 +- docs/Product.html | 4 +- docs/Reaction.html | 4 +- docs/RemoteAuth.html | 4 +- docs/Util.html | 4 +- docs/authStrategies_BaseAuthStrategy.js.html | 4 +- docs/authStrategies_LegacySessionAuth.js.html | 4 +- docs/authStrategies_LocalAuth.js.html | 4 +- docs/authStrategies_NoAuth.js.html | 4 +- docs/authStrategies_RemoteAuth.js.html | 4 +- docs/global.html | 4 +- docs/index.html | 6 +- docs/structures_Base.js.html | 4 +- docs/structures_BusinessContact.js.html | 4 +- docs/structures_Buttons.js.html | 4 +- docs/structures_Call.js.html | 4 +- docs/structures_Chat.js.html | 4 +- docs/structures_ClientInfo.js.html | 4 +- docs/structures_Contact.js.html | 4 +- docs/structures_GroupChat.js.html | 74 ++++++++++++------- docs/structures_GroupNotification.js.html | 4 +- docs/structures_Label.js.html | 4 +- docs/structures_List.js.html | 4 +- docs/structures_Location.js.html | 4 +- docs/structures_Message.js.html | 4 +- docs/structures_MessageMedia.js.html | 4 +- docs/structures_Order.js.html | 4 +- docs/structures_Payment.js.html | 4 +- docs/structures_PrivateChat.js.html | 4 +- docs/structures_PrivateContact.js.html | 4 +- docs/structures_Product.js.html | 4 +- docs/structures_ProductMetadata.js.html | 4 +- docs/structures_Reaction.js.html | 4 +- docs/util_Constants.js.html | 4 +- docs/util_InterfaceController.js.html | 4 +- docs/util_Util.js.html | 4 +- package.json | 2 +- 60 files changed, 174 insertions(+), 154 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 405ceda088..f24dffd81e 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Base + whatsapp-web.js 1.19.2 » Class: Base @@ -15,7 +15,7 @@ diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 7e45bbdd5c..734f02dfe8 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: BaseAuthStrategy + whatsapp-web.js 1.19.2 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index a009637895..66a9d7469b 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: BusinessContact + whatsapp-web.js 1.19.2 » Class: BusinessContact @@ -15,7 +15,7 @@ diff --git a/docs/Buttons.html b/docs/Buttons.html index eda638764e..5d57a0ed22 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Buttons + whatsapp-web.js 1.19.2 » Class: Buttons @@ -15,7 +15,7 @@ diff --git a/docs/Call.html b/docs/Call.html index 5bf102ce40..3c190bfcfe 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Call + whatsapp-web.js 1.19.2 » Class: Call @@ -15,7 +15,7 @@ diff --git a/docs/Chat.html b/docs/Chat.html index 58d67b0c86..4cf6276342 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Chat + whatsapp-web.js 1.19.2 » Class: Chat @@ -15,7 +15,7 @@ diff --git a/docs/Client.html b/docs/Client.html index de09c4a7e7..cd112ddb44 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Client + whatsapp-web.js 1.19.2 » Class: Client @@ -15,7 +15,7 @@ diff --git a/docs/Client.js.html b/docs/Client.js.html index e3e7bb4bdf..c5f6c316d9 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: Client.js + whatsapp-web.js 1.19.2 » Source: Client.js @@ -15,7 +15,7 @@ @@ -805,7 +805,7 @@

Source: Client.js

*/ async getInviteInfo(inviteCode) { return await this.pupPage.evaluate(inviteCode => { - return window.Store.InviteInfo.sendQueryGroupInvite(inviteCode); + return window.Store.InviteInfo.queryGroupInvite(inviteCode); }, inviteCode); } @@ -815,11 +815,11 @@

Source: Client.js

* @returns {Promise&lt;string>} Id of the joined Chat */ async acceptInvite(inviteCode) { - const chatId = await this.pupPage.evaluate(async inviteCode => { - return await window.Store.Invite.sendJoinGroupViaInvite(inviteCode); + const res = await this.pupPage.evaluate(async inviteCode => { + return await window.Store.Invite.joinGroupViaInvite(inviteCode); }, inviteCode); - return chatId._serialized; + return res.gid._serialized; } /** @@ -1126,19 +1126,17 @@

Source: Client.js

const createRes = await this.pupPage.evaluate(async (name, participantIds) => { const participantWIDs = participantIds.map(p => window.Store.WidFactory.createWid(p)); - const id = window.Store.MsgKey.newId(); - const res = await window.Store.GroupUtils.sendCreateGroup(name, participantWIDs, undefined, id); - return res; + return await window.Store.GroupUtils.createGroup(name, participantWIDs, 0); }, name, participants); const missingParticipants = createRes.participants.reduce(((missing, c) => { - const id = Object.keys(c)[0]; - const statusCode = c[id].code; + const id = c.wid._serialized; + const statusCode = c.error ? c.error.toString() : '200'; if (statusCode != 200) return Object.assign(missing, { [id]: statusCode }); return missing; }), {}); - return { gid: createRes.gid, missingParticipants }; + return { gid: createRes.wid, missingParticipants }; } /** diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 2653b0ccdd..35c3a48883 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: ClientInfo + whatsapp-web.js 1.19.2 » Class: ClientInfo @@ -15,7 +15,7 @@ diff --git a/docs/Contact.html b/docs/Contact.html index 3144b3afcc..7a35f05124 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Contact + whatsapp-web.js 1.19.2 » Class: Contact @@ -15,7 +15,7 @@ diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 9cabfa227c..2f7ed979b3 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: GroupChat + whatsapp-web.js 1.19.2 » Class: GroupChat @@ -15,7 +15,7 @@ diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 419bcf981a..08fcd3437a 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: GroupNotification + whatsapp-web.js 1.19.2 » Class: GroupNotification @@ -15,7 +15,7 @@ diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 2d73cf874e..92e11fb0cb 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: InterfaceController + whatsapp-web.js 1.19.2 » Class: InterfaceController @@ -15,7 +15,7 @@ diff --git a/docs/Label.html b/docs/Label.html index 578779f070..e3e390064c 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Label + whatsapp-web.js 1.19.2 » Class: Label @@ -15,7 +15,7 @@ diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 833f2c400a..4331e896c5 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: LegacySessionAuth + whatsapp-web.js 1.19.2 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ diff --git a/docs/List.html b/docs/List.html index ead1c22003..6d6c2be7fc 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: List + whatsapp-web.js 1.19.2 » Class: List @@ -15,7 +15,7 @@ diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 54cb42a7e8..5b844cc6a4 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: LocalAuth + whatsapp-web.js 1.19.2 » Class: LocalAuth @@ -15,7 +15,7 @@ diff --git a/docs/Location.html b/docs/Location.html index fd1926c792..f8acb1c60a 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Location + whatsapp-web.js 1.19.2 » Class: Location @@ -15,7 +15,7 @@ diff --git a/docs/Message.html b/docs/Message.html index 17825457f4..fda9225f78 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Message + whatsapp-web.js 1.19.2 » Class: Message @@ -15,7 +15,7 @@ diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 33359d362c..c7c0ba3c30 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: MessageMedia + whatsapp-web.js 1.19.2 » Class: MessageMedia @@ -15,7 +15,7 @@ diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 119126acf1..90edbd3cd3 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: NoAuth + whatsapp-web.js 1.19.2 » Class: NoAuth @@ -15,7 +15,7 @@ diff --git a/docs/Order.html b/docs/Order.html index ea747c4655..0f3c164ccc 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Order + whatsapp-web.js 1.19.2 » Class: Order @@ -15,7 +15,7 @@ diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index f38ad1e596..46b71c2d8c 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: PrivateChat + whatsapp-web.js 1.19.2 » Class: PrivateChat @@ -15,7 +15,7 @@ diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 3473ea0378..5b30b0b2f7 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: PrivateContact + whatsapp-web.js 1.19.2 » Class: PrivateContact @@ -15,7 +15,7 @@ diff --git a/docs/Product.html b/docs/Product.html index 457f833d6e..aca2fa6f34 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Product + whatsapp-web.js 1.19.2 » Class: Product @@ -15,7 +15,7 @@ diff --git a/docs/Reaction.html b/docs/Reaction.html index 0517004149..09d99cb6c9 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Reaction + whatsapp-web.js 1.19.2 » Class: Reaction @@ -15,7 +15,7 @@ diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 5f1baa776c..6c881ec24b 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: RemoteAuth + whatsapp-web.js 1.19.2 » Class: RemoteAuth @@ -15,7 +15,7 @@ diff --git a/docs/Util.html b/docs/Util.html index 5083b76f00..5600fa0763 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Class: Util + whatsapp-web.js 1.19.2 » Class: Util @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 2db95235c7..386a4d478a 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.19.2 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index ed0343d79d..3cd7411695 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.19.2 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 63203666d6..9fa3e14d8f 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.19.2 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 1be866f9f9..b953e64eef 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.19.2 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index f7f48d2e62..54530aad57 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.19.2 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ diff --git a/docs/global.html b/docs/global.html index f599dc79d4..db11868c28 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Globals + whatsapp-web.js 1.19.2 » Globals @@ -15,7 +15,7 @@ diff --git a/docs/index.html b/docs/index.html index 7b3457e400..7ea7f5f4bb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Home + whatsapp-web.js 1.19.2 » Home @@ -15,7 +15,7 @@ @@ -27,7 +27,7 @@
diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 4e70ed72a1..e9fe8539c4 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Base.js + whatsapp-web.js 1.19.2 » Source: structures/Base.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index e7600cd55b..8599931d64 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/BusinessContact.js + whatsapp-web.js 1.19.2 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 3a79b8d5c3..81e91574dd 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Buttons.js + whatsapp-web.js 1.19.2 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 2c64c0a94f..1ada572e15 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Call.js + whatsapp-web.js 1.19.2 » Source: structures/Call.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 0fab4cbc11..59f32bb899 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Chat.js + whatsapp-web.js 1.19.2 » Source: structures/Chat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 4c205c7623..8645f822c4 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/ClientInfo.js + whatsapp-web.js 1.19.2 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 2da12453e5..b220a2d707 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Contact.js + whatsapp-web.js 1.19.2 » Source: structures/Contact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index 7635f2ea86..fd3b90c16d 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/GroupChat.js + whatsapp-web.js 1.19.2 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -90,10 +90,15 @@

Source: structures/GroupChat.js

* @returns {Promise&lt;Object>} */ async addParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendAddParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = await Promise.all(participantIds.map(async p => { + const wid = window.Store.WidFactory.createWid(p); + return await window.Store.Contact.get(wid); + })); + await window.Store.GroupParticipants.addParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -103,10 +108,14 @@

Source: structures/GroupChat.js

* @returns {Promise&lt;Object>} */ async removeParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendRemoveParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = participantIds.map(p => { + return chat.groupMetadata.participants.get(p); + }).filter(p => Boolean(p)); + await window.Store.GroupParticipants.removeParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -116,10 +125,14 @@

Source: structures/GroupChat.js

* @returns {Promise&lt;{ status: number }>} Object with status code indicating if the operation was successful */ async promoteParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendPromoteParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = participantIds.map(p => { + return chat.groupMetadata.participants.get(p); + }).filter(p => Boolean(p)); + await window.Store.GroupParticipants.promoteParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -129,10 +142,14 @@

Source: structures/GroupChat.js

* @returns {Promise&lt;{ status: number }>} Object with status code indicating if the operation was successful */ async demoteParticipants(participantIds) { - return await this.client.pupPage.evaluate((chatId, participantIds) => { + return await this.client.pupPage.evaluate(async (chatId, participantIds) => { const chatWid = window.Store.WidFactory.createWid(chatId); - const participantWids = participantIds.map(p => window.Store.WidFactory.createWid(p)); - return window.Store.GroupParticipants.sendDemoteParticipants(chatWid, participantWids); + const chat = await window.Store.Chat.find(chatWid); + const participants = participantIds.map(p => { + return chat.groupMetadata.participants.get(p); + }).filter(p => Boolean(p)); + await window.Store.GroupParticipants.demoteParticipants(chat, participants); + return { status: 200 }; }, this.id._serialized, participantIds); } @@ -145,7 +162,8 @@

Source: structures/GroupChat.js

const success = await this.client.pupPage.evaluate(async (chatId, subject) => { const chatWid = window.Store.WidFactory.createWid(chatId); try { - return await window.Store.GroupUtils.sendSetGroupSubject(chatWid, subject); + await window.Store.GroupUtils.setGroupSubject(chatWid, subject); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -167,7 +185,8 @@

Source: structures/GroupChat.js

const chatWid = window.Store.WidFactory.createWid(chatId); let descId = window.Store.GroupMetadata.get(chatWid).descId; try { - return await window.Store.GroupUtils.sendSetGroupDescription(chatWid, description, window.Store.MsgKey.newId(), descId); + await window.Store.GroupUtils.setGroupDescription(chatWid, description, window.Store.MsgKey.newId(), descId); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -188,7 +207,8 @@

Source: structures/GroupChat.js

const success = await this.client.pupPage.evaluate(async (chatId, adminsOnly) => { const chatWid = window.Store.WidFactory.createWid(chatId); try { - return await window.Store.GroupUtils.sendSetGroupProperty(chatWid, 'announcement', adminsOnly ? 1 : 0); + await window.Store.GroupUtils.setGroupProperty(chatWid, 'announcement', adminsOnly ? 1 : 0); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -210,7 +230,8 @@

Source: structures/GroupChat.js

const success = await this.client.pupPage.evaluate(async (chatId, adminsOnly) => { const chatWid = window.Store.WidFactory.createWid(chatId); try { - return await window.Store.GroupUtils.sendSetGroupProperty(chatWid, 'restrict', adminsOnly ? 1 : 0); + await window.Store.GroupUtils.setGroupProperty(chatWid, 'restrict', adminsOnly ? 1 : 0); + return true; } catch (err) { if(err.name === 'ServerStatusCodeError') return false; throw err; @@ -228,12 +249,12 @@

Source: structures/GroupChat.js

* @returns {Promise&lt;string>} Group's invite code */ async getInviteCode() { - const code = await this.client.pupPage.evaluate(async chatId => { + const codeRes = await this.client.pupPage.evaluate(async chatId => { const chatWid = window.Store.WidFactory.createWid(chatId); - return window.Store.Invite.sendQueryGroupInviteCode(chatWid); + return window.Store.Invite.queryGroupInviteCode(chatWid); }, this.id._serialized); - return code; + return codeRes.code; } /** @@ -241,12 +262,12 @@

Source: structures/GroupChat.js

* @returns {Promise&lt;string>} New invite code */ async revokeInvite() { - const code = await this.client.pupPage.evaluate(chatId => { + const codeRes = await this.client.pupPage.evaluate(chatId => { const chatWid = window.Store.WidFactory.createWid(chatId); - return window.Store.Invite.sendRevokeGroupInviteCode(chatWid); + return window.Store.Invite.resetGroupInviteCode(chatWid); }, this.id._serialized); - return code; + return codeRes.code; } /** @@ -254,9 +275,10 @@

Source: structures/GroupChat.js

* @returns {Promise} */ async leave() { - await this.client.pupPage.evaluate(chatId => { + await this.client.pupPage.evaluate(async chatId => { const chatWid = window.Store.WidFactory.createWid(chatId); - return window.Store.GroupUtils.sendExitGroup(chatWid); + const chat = await window.Store.Chat.find(chatWid); + return window.Store.GroupUtils.sendExitGroup(chat); }, this.id._serialized); } diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 882f1cd178..907cdba6e9 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/GroupNotification.js + whatsapp-web.js 1.19.2 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 84fe4a5982..9bdcc3fd65 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Label.js + whatsapp-web.js 1.19.2 » Source: structures/Label.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 5b90208038..c50fa7e3b0 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/List.js + whatsapp-web.js 1.19.2 » Source: structures/List.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 5d66947c06..2c81b9df45 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Location.js + whatsapp-web.js 1.19.2 » Source: structures/Location.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 0c4d051282..0d8eb4f04c 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Message.js + whatsapp-web.js 1.19.2 » Source: structures/Message.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 499f7cfb6b..4dc3d5a6ca 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/MessageMedia.js + whatsapp-web.js 1.19.2 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 9ad5d7ec72..fd44444c1e 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Order.js + whatsapp-web.js 1.19.2 » Source: structures/Order.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index e934dd14b0..ef6c307f0f 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Payment.js + whatsapp-web.js 1.19.2 » Source: structures/Payment.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index b7af145730..d95fc6e15c 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/PrivateChat.js + whatsapp-web.js 1.19.2 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 7aec0d9865..13abf4a25c 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/PrivateContact.js + whatsapp-web.js 1.19.2 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 9e78871cf3..159188532b 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Product.js + whatsapp-web.js 1.19.2 » Source: structures/Product.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index ba7f554f2b..ac7fca6149 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.19.2 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 6b47024739..0eb2f2c594 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: structures/Reaction.js + whatsapp-web.js 1.19.2 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 12a26d5159..c5ca2aa91a 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: util/Constants.js + whatsapp-web.js 1.19.2 » Source: util/Constants.js @@ -15,7 +15,7 @@ diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 02b7dc3b3d..4de61c7a8d 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: util/InterfaceController.js + whatsapp-web.js 1.19.2 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index 5f19a8f839..ca4ad46cc6 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.1 » Source: util/Util.js + whatsapp-web.js 1.19.2 » Source: util/Util.js @@ -15,7 +15,7 @@ diff --git a/package.json b/package.json index a396b2db4d..40d37e3d4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.19.1", + "version": "1.19.2", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From c208c8936a2dfc409c64a36574770645fdee7d78 Mon Sep 17 00:00:00 2001 From: Michal Serlui <70711723+shirser121@users.noreply.github.com> Date: Thu, 26 Jan 2023 23:52:39 +0200 Subject: [PATCH 031/139] Fix: message.getInfo (#1953) window.Store.MessageInfo.sendQueryMsgInfo now needs msg.id instead of msg --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 7ac55366d4..867bd888ee 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -494,7 +494,7 @@ class Message extends Base { const msg = window.Store.Msg.get(msgId); if (!msg) return null; - return await window.Store.MessageInfo.sendQueryMsgInfo(msg); + return await window.Store.MessageInfo.sendQueryMsgInfo(msg.id); }, this.id._serialized); return info; From 23cea1bac08388677587486ace5cff50bc00b313 Mon Sep 17 00:00:00 2001 From: WWebJS Bot Date: Thu, 26 Jan 2023 21:54:22 +0000 Subject: [PATCH 032/139] 1.20.0-alpha.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 40d37e3d4e..f272b46e3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.19.2", + "version": "1.20.0-alpha.0", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 97283c84c70fdb56c9b450e35fcf0f1d6154fc24 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 28 Jan 2023 00:35:27 -0400 Subject: [PATCH 033/139] chore: mark version v1.19.3 --- docs/Base.html | 6 +++--- docs/BaseAuthStrategy.html | 6 +++--- docs/BusinessContact.html | 6 +++--- docs/Buttons.html | 6 +++--- docs/Call.html | 6 +++--- docs/Chat.html | 6 +++--- docs/Client.html | 6 +++--- docs/Client.js.html | 6 +++--- docs/ClientInfo.html | 6 +++--- docs/Contact.html | 6 +++--- docs/GroupChat.html | 6 +++--- docs/GroupNotification.html | 6 +++--- docs/InterfaceController.html | 6 +++--- docs/Label.html | 6 +++--- docs/LegacySessionAuth.html | 6 +++--- docs/List.html | 6 +++--- docs/LocalAuth.html | 6 +++--- docs/Location.html | 6 +++--- docs/Message.html | 6 +++--- docs/MessageMedia.html | 6 +++--- docs/NoAuth.html | 6 +++--- docs/Order.html | 6 +++--- docs/PrivateChat.html | 6 +++--- docs/PrivateContact.html | 6 +++--- docs/Product.html | 6 +++--- docs/Reaction.html | 6 +++--- docs/RemoteAuth.html | 6 +++--- docs/Util.html | 6 +++--- docs/authStrategies_BaseAuthStrategy.js.html | 6 +++--- docs/authStrategies_LegacySessionAuth.js.html | 6 +++--- docs/authStrategies_LocalAuth.js.html | 6 +++--- docs/authStrategies_NoAuth.js.html | 6 +++--- docs/authStrategies_RemoteAuth.js.html | 6 +++--- docs/global.html | 6 +++--- docs/index.html | 8 ++++---- docs/structures_Base.js.html | 6 +++--- docs/structures_BusinessContact.js.html | 6 +++--- docs/structures_Buttons.js.html | 6 +++--- docs/structures_Call.js.html | 6 +++--- docs/structures_Chat.js.html | 6 +++--- docs/structures_ClientInfo.js.html | 6 +++--- docs/structures_Contact.js.html | 6 +++--- docs/structures_GroupChat.js.html | 6 +++--- docs/structures_GroupNotification.js.html | 6 +++--- docs/structures_Label.js.html | 6 +++--- docs/structures_List.js.html | 6 +++--- docs/structures_Location.js.html | 6 +++--- docs/structures_Message.js.html | 8 ++++---- docs/structures_MessageMedia.js.html | 6 +++--- docs/structures_Order.js.html | 6 +++--- docs/structures_Payment.js.html | 6 +++--- docs/structures_PrivateChat.js.html | 6 +++--- docs/structures_PrivateContact.js.html | 6 +++--- docs/structures_Product.js.html | 6 +++--- docs/structures_ProductMetadata.js.html | 6 +++--- docs/structures_Reaction.js.html | 6 +++--- docs/util_Constants.js.html | 6 +++--- docs/util_InterfaceController.js.html | 6 +++--- docs/util_Util.js.html | 6 +++--- package.json | 2 +- 60 files changed, 180 insertions(+), 180 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index f24dffd81e..2ebc5afa52 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Base + whatsapp-web.js 1.19.3 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 734f02dfe8..48c9650e95 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: BaseAuthStrategy + whatsapp-web.js 1.19.3 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 66a9d7469b..1eeac49a07 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: BusinessContact + whatsapp-web.js 1.19.3 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index 5d57a0ed22..e3fc3fd3ec 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Buttons + whatsapp-web.js 1.19.3 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 3c190bfcfe..126870bfe0 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Call + whatsapp-web.js 1.19.3 » Class: Call @@ -15,7 +15,7 @@ @@ -168,7 +168,7 @@

reject<
diff --git a/docs/Chat.html b/docs/Chat.html index 4cf6276342..24885c1f57 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Chat + whatsapp-web.js 1.19.3 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index cd112ddb44..06cf83b96f 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Client + whatsapp-web.js 1.19.3 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index c5f6c316d9..f2d06a90cf 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: Client.js + whatsapp-web.js 1.19.3 » Source: Client.js @@ -15,7 +15,7 @@ @@ -1222,7 +1222,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 35c3a48883..16bf71971d 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: ClientInfo + whatsapp-web.js 1.19.3 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index 7a35f05124..c94f5542e0 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Contact + whatsapp-web.js 1.19.3 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 2f7ed979b3..6e58e0a46f 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: GroupChat + whatsapp-web.js 1.19.3 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 08fcd3437a..35c89811bd 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: GroupNotification + whatsapp-web.js 1.19.3 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 92e11fb0cb..a6be6142dc 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: InterfaceController + whatsapp-web.js 1.19.3 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index e3e390064c..1d42ba716a 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Label + whatsapp-web.js 1.19.3 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 4331e896c5..e36f4e7258 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: LegacySessionAuth + whatsapp-web.js 1.19.3 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index 6d6c2be7fc..efc7193402 100644 --- a/docs/List.html +++ b/docs/List.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: List + whatsapp-web.js 1.19.3 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 5b844cc6a4..3ae6e8603d 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: LocalAuth + whatsapp-web.js 1.19.3 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index f8acb1c60a..5728b47651 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Location + whatsapp-web.js 1.19.3 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index fda9225f78..3f46e4fb79 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Message + whatsapp-web.js 1.19.3 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index c7c0ba3c30..417c528abf 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: MessageMedia + whatsapp-web.js 1.19.3 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 90edbd3cd3..a267f9777e 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: NoAuth + whatsapp-web.js 1.19.3 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index 0f3c164ccc..e86108116a 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Order + whatsapp-web.js 1.19.3 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 46b71c2d8c..795c1e4e6c 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: PrivateChat + whatsapp-web.js 1.19.3 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 5b30b0b2f7..5854d05b39 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: PrivateContact + whatsapp-web.js 1.19.3 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index aca2fa6f34..4869cec646 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Product + whatsapp-web.js 1.19.3 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index 09d99cb6c9..9e87af8d3d 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Reaction + whatsapp-web.js 1.19.3 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 6c881ec24b..fd4105da0a 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: RemoteAuth + whatsapp-web.js 1.19.3 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index 5600fa0763..319597e77c 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Class: Util + whatsapp-web.js 1.19.3 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 386a4d478a..be94536986 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.19.3 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 3cd7411695..8401f76ecb 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.19.3 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 9fa3e14d8f..9ada1154c1 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.19.3 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index b953e64eef..fc53dce07c 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.19.3 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index 54530aad57..f905f8f9d5 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.19.3 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index db11868c28..65047fbd16 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Globals + whatsapp-web.js 1.19.3 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index 7ea7f5f4bb..d523017ad9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Home + whatsapp-web.js 1.19.3 » Home @@ -15,7 +15,7 @@ @@ -27,7 +27,7 @@
@@ -3281,7 +3281,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index e9fe8539c4..d028984c01 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Base.js + whatsapp-web.js 1.19.3 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 8599931d64..0f575efdc8 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/BusinessContact.js + whatsapp-web.js 1.19.3 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 81e91574dd..d5baa7f1ec 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Buttons.js + whatsapp-web.js 1.19.3 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 1ada572e15..b2fd323853 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Call.js + whatsapp-web.js 1.19.3 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -114,7 +114,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 59f32bb899..6997d816d8 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Chat.js + whatsapp-web.js 1.19.3 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 8645f822c4..4c4003f440 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/ClientInfo.js + whatsapp-web.js 1.19.3 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index b220a2d707..ebbaf094b9 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Contact.js + whatsapp-web.js 1.19.3 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index fd3b90c16d..c8fd25e043 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/GroupChat.js + whatsapp-web.js 1.19.3 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -294,7 +294,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 907cdba6e9..8c6e3b6c43 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/GroupNotification.js + whatsapp-web.js 1.19.3 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 9bdcc3fd65..77bebb739c 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Label.js + whatsapp-web.js 1.19.3 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index c50fa7e3b0..b33b8a713f 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/List.js + whatsapp-web.js 1.19.3 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 2c81b9df45..3d614df1bc 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Location.js + whatsapp-web.js 1.19.3 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 0d8eb4f04c..b57e883181 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Message.js + whatsapp-web.js 1.19.3 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -525,7 +525,7 @@

Source: structures/Message.js

const msg = window.Store.Msg.get(msgId); if (!msg) return null; - return await window.Store.MessageInfo.sendQueryMsgInfo(msg); + return await window.Store.MessageInfo.sendQueryMsgInfo(msg.id); }, this.id._serialized); return info; @@ -573,7 +573,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 4dc3d5a6ca..5d8cf742aa 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/MessageMedia.js + whatsapp-web.js 1.19.3 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index fd44444c1e..dca025ebfb 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Order.js + whatsapp-web.js 1.19.3 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index ef6c307f0f..4cf4d1f4cb 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Payment.js + whatsapp-web.js 1.19.3 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index d95fc6e15c..ea8345b2a8 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/PrivateChat.js + whatsapp-web.js 1.19.3 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 13abf4a25c..00d3549568 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/PrivateContact.js + whatsapp-web.js 1.19.3 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 159188532b..a81ff9583d 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Product.js + whatsapp-web.js 1.19.3 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index ac7fca6149..aac678148b 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.19.3 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 0eb2f2c594..b03702fa27 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: structures/Reaction.js + whatsapp-web.js 1.19.3 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index c5ca2aa91a..6fa4463fc5 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: util/Constants.js + whatsapp-web.js 1.19.3 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 4de61c7a8d..d4a7f1f90e 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: util/InterfaceController.js + whatsapp-web.js 1.19.3 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -164,7 +164,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index ca4ad46cc6..dec3fc7fde 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.19.2 » Source: util/Util.js + whatsapp-web.js 1.19.3 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index f272b46e3b..b51832e9e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.20.0-alpha.0", + "version": "1.19.3", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From f1607752dd8411df4020bcfd6ee2b7533210b32e Mon Sep 17 00:00:00 2001 From: Michal Serlui <70711723+shirser121@users.noreply.github.com> Date: Fri, 10 Feb 2023 16:06:20 +0200 Subject: [PATCH 034/139] try to fix queryWidExists (#1987) --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 7acc145681..77b0741c13 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -25,7 +25,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default; window.Store.MessageInfo = window.mR.findModule('sendQueryMsgInfo')[0]; window.Store.OpaqueData = window.mR.findModule(module => module.default && module.default.createFromData)[0].default; - window.Store.QueryExist = window.mR.findModule('queryExists')[0].queryExists; + window.Store.QueryExist = window.mR.findModule('queryWidExists')[0].queryExists; window.Store.QueryProduct = window.mR.findModule('queryProduct')[0]; window.Store.QueryOrder = window.mR.findModule('queryOrder')[0]; window.Store.SendClear = window.mR.findModule('sendClear')[0]; From e8d4874b265968170182a8a0b768fc7d47b26b3c Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 11 Feb 2023 15:18:06 -0800 Subject: [PATCH 035/139] fix getNumberId --- src/Client.js | 2 +- src/util/Injected.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.js b/src/Client.js index 7a09d7a8d9..52ea96f686 100644 --- a/src/Client.js +++ b/src/Client.js @@ -1043,7 +1043,7 @@ class Client extends EventEmitter { return await this.pupPage.evaluate(async number => { const wid = window.Store.WidFactory.createWid(number); - const result = await window.Store.QueryExist(wid); + const result = await window.Store.QueryExist.queryWidExists(wid); if (!result || result.wid === undefined) return null; return result.wid; }, number); diff --git a/src/util/Injected.js b/src/util/Injected.js index 77b0741c13..8287fb012e 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -25,7 +25,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default; window.Store.MessageInfo = window.mR.findModule('sendQueryMsgInfo')[0]; window.Store.OpaqueData = window.mR.findModule(module => module.default && module.default.createFromData)[0].default; - window.Store.QueryExist = window.mR.findModule('queryWidExists')[0].queryExists; + window.Store.QueryExist = window.mR.findModule('queryWidExists')[0]; window.Store.QueryProduct = window.mR.findModule('queryProduct')[0]; window.Store.QueryOrder = window.mR.findModule('queryOrder')[0]; window.Store.SendClear = window.mR.findModule('sendClear')[0]; From 842a342f72d112d7d2373a5ca7a10f8277388817 Mon Sep 17 00:00:00 2001 From: tofers Date: Sun, 12 Feb 2023 02:20:21 +0300 Subject: [PATCH 036/139] Fixing the queryWidExists function (#1989) * Update Injected.js fix function queryWidExists * Update Injected.js support WA old version 2.2305.7 --------- Co-authored-by: Pedro S. Lopez --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 8287fb012e..28cc069a66 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -25,7 +25,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default; window.Store.MessageInfo = window.mR.findModule('sendQueryMsgInfo')[0]; window.Store.OpaqueData = window.mR.findModule(module => module.default && module.default.createFromData)[0].default; - window.Store.QueryExist = window.mR.findModule('queryWidExists')[0]; + window.Store.QueryExist = window.mR.findModule('queryExists')[0] ? window.mR.findModule('queryExists')[0].queryExists : window.mR.findModule('queryExist')[0].queryWidExists; window.Store.QueryProduct = window.mR.findModule('queryProduct')[0]; window.Store.QueryOrder = window.mR.findModule('queryOrder')[0]; window.Store.SendClear = window.mR.findModule('sendClear')[0]; From 617e0b89d577ce508a3d8d37d661f11a9a9eded0 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 11 Feb 2023 15:22:30 -0800 Subject: [PATCH 037/139] merge fix --- src/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.js b/src/Client.js index 52ea96f686..7a09d7a8d9 100644 --- a/src/Client.js +++ b/src/Client.js @@ -1043,7 +1043,7 @@ class Client extends EventEmitter { return await this.pupPage.evaluate(async number => { const wid = window.Store.WidFactory.createWid(number); - const result = await window.Store.QueryExist.queryWidExists(wid); + const result = await window.Store.QueryExist(wid); if (!result || result.wid === undefined) return null; return result.wid; }, number); From 1294170a25cc7a1e3d97237f7ade7a661d451b03 Mon Sep 17 00:00:00 2001 From: tofers Date: Sun, 12 Feb 2023 02:25:54 +0300 Subject: [PATCH 038/139] Fix mute chat (#1982) * fix function set mute chat * chat mute new object --- src/Client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.js b/src/Client.js index 7a09d7a8d9..3d87ace7fa 100644 --- a/src/Client.js +++ b/src/Client.js @@ -937,7 +937,7 @@ class Client extends EventEmitter { unmuteDate = unmuteDate ? unmuteDate.getTime() / 1000 : -1; await this.pupPage.evaluate(async (chatId, timestamp) => { let chat = await window.Store.Chat.get(chatId); - await chat.mute.mute(timestamp, !0); + await chat.mute.mute({expiration: timestamp, sendDevice:!0}); }, chatId, unmuteDate || -1); } From 313bd085b3ee277f6de215e11e3eb2511c9172bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 11 Feb 2023 15:26:28 -0800 Subject: [PATCH 039/139] Update supported WhatsApp Web version to v2.2306.7 (#1954) Co-authored-by: pedroslopez --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54c439b19e..adb1cfec91 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2301.6](https://img.shields.io/badge/WhatsApp_Web-2.2301.6-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2306.7](https://img.shields.io/badge/WhatsApp_Web-2.2306.7-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index 07e78805ef..e7197d623d 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2301.6 \ No newline at end of file +2.2306.7 \ No newline at end of file From 6f2ad1773e6bb34b1f916f6485114bc1b26c837b Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 11 Feb 2023 15:27:30 -0800 Subject: [PATCH 040/139] chore: mark version v1.19.4 --- docs/Base.html | 8 ++++---- docs/BaseAuthStrategy.html | 8 ++++---- docs/BusinessContact.html | 8 ++++---- docs/Buttons.html | 8 ++++---- docs/Call.html | 8 ++++---- docs/Chat.html | 8 ++++---- docs/Client.html | 8 ++++---- docs/Client.js.html | 10 +++++----- docs/ClientInfo.html | 8 ++++---- docs/Contact.html | 8 ++++---- docs/GroupChat.html | 8 ++++---- docs/GroupNotification.html | 8 ++++---- docs/InterfaceController.html | 8 ++++---- docs/Label.html | 8 ++++---- docs/LegacySessionAuth.html | 8 ++++---- docs/List.html | 8 ++++---- docs/LocalAuth.html | 8 ++++---- docs/Location.html | 8 ++++---- docs/Message.html | 8 ++++---- docs/MessageMedia.html | 8 ++++---- docs/NoAuth.html | 8 ++++---- docs/Order.html | 8 ++++---- docs/PrivateChat.html | 8 ++++---- docs/PrivateContact.html | 8 ++++---- docs/Product.html | 8 ++++---- docs/Reaction.html | 8 ++++---- docs/RemoteAuth.html | 8 ++++---- docs/Util.html | 8 ++++---- docs/authStrategies_BaseAuthStrategy.js.html | 8 ++++---- docs/authStrategies_LegacySessionAuth.js.html | 8 ++++---- docs/authStrategies_LocalAuth.js.html | 8 ++++---- docs/authStrategies_NoAuth.js.html | 8 ++++---- docs/authStrategies_RemoteAuth.js.html | 8 ++++---- docs/global.html | 8 ++++---- docs/index.html | 12 ++++++------ docs/structures_Base.js.html | 8 ++++---- docs/structures_BusinessContact.js.html | 8 ++++---- docs/structures_Buttons.js.html | 8 ++++---- docs/structures_Call.js.html | 8 ++++---- docs/structures_Chat.js.html | 8 ++++---- docs/structures_ClientInfo.js.html | 8 ++++---- docs/structures_Contact.js.html | 8 ++++---- docs/structures_GroupChat.js.html | 8 ++++---- docs/structures_GroupNotification.js.html | 8 ++++---- docs/structures_Label.js.html | 8 ++++---- docs/structures_List.js.html | 8 ++++---- docs/structures_Location.js.html | 8 ++++---- docs/structures_Message.js.html | 8 ++++---- docs/structures_MessageMedia.js.html | 8 ++++---- docs/structures_Order.js.html | 8 ++++---- docs/structures_Payment.js.html | 8 ++++---- docs/structures_PrivateChat.js.html | 8 ++++---- docs/structures_PrivateContact.js.html | 8 ++++---- docs/structures_Product.js.html | 8 ++++---- docs/structures_ProductMetadata.js.html | 8 ++++---- docs/structures_Reaction.js.html | 8 ++++---- docs/util_Constants.js.html | 8 ++++---- docs/util_InterfaceController.js.html | 8 ++++---- docs/util_Util.js.html | 8 ++++---- package.json | 2 +- 60 files changed, 240 insertions(+), 240 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 2ebc5afa52..34a43c616f 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Base + whatsapp-web.js 1.19.4 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 48c9650e95..b2336f62a2 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: BaseAuthStrategy + whatsapp-web.js 1.19.4 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 1eeac49a07..9bb7455e47 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: BusinessContact + whatsapp-web.js 1.19.4 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index e3fc3fd3ec..57318d0cfa 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Buttons + whatsapp-web.js 1.19.4 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 126870bfe0..ae81bbd596 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Call + whatsapp-web.js 1.19.4 » Class: Call @@ -15,7 +15,7 @@ @@ -168,7 +168,7 @@

reject<
diff --git a/docs/Chat.html b/docs/Chat.html index 24885c1f57..d89649c05d 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Chat + whatsapp-web.js 1.19.4 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 06cf83b96f..5cc9d96c9c 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Client + whatsapp-web.js 1.19.4 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index f2d06a90cf..56d491489c 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: Client.js + whatsapp-web.js 1.19.4 » Source: Client.js @@ -15,7 +15,7 @@ @@ -968,7 +968,7 @@

Source: Client.js

unmuteDate = unmuteDate ? unmuteDate.getTime() / 1000 : -1; await this.pupPage.evaluate(async (chatId, timestamp) => { let chat = await window.Store.Chat.get(chatId); - await chat.mute.mute(timestamp, !0); + await chat.mute.mute({expiration: timestamp, sendDevice:!0}); }, chatId, unmuteDate || -1); } @@ -1222,7 +1222,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 16bf71971d..12eb526eb7 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: ClientInfo + whatsapp-web.js 1.19.4 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index c94f5542e0..30565a59fe 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Contact + whatsapp-web.js 1.19.4 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 6e58e0a46f..0fdfebe531 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: GroupChat + whatsapp-web.js 1.19.4 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 35c89811bd..7fa5668246 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: GroupNotification + whatsapp-web.js 1.19.4 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index a6be6142dc..76633f31b7 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: InterfaceController + whatsapp-web.js 1.19.4 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index 1d42ba716a..2973917522 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Label + whatsapp-web.js 1.19.4 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index e36f4e7258..38f23faf75 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: LegacySessionAuth + whatsapp-web.js 1.19.4 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index efc7193402..c85f364500 100644 --- a/docs/List.html +++ b/docs/List.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: List + whatsapp-web.js 1.19.4 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 3ae6e8603d..8a7d37b064 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: LocalAuth + whatsapp-web.js 1.19.4 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index 5728b47651..a10bcc07ce 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Location + whatsapp-web.js 1.19.4 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index 3f46e4fb79..62418d3a75 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Message + whatsapp-web.js 1.19.4 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 417c528abf..2a1a81be60 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: MessageMedia + whatsapp-web.js 1.19.4 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index a267f9777e..e637049342 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: NoAuth + whatsapp-web.js 1.19.4 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index e86108116a..aaee8eeb60 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Order + whatsapp-web.js 1.19.4 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 795c1e4e6c..c27f59497b 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: PrivateChat + whatsapp-web.js 1.19.4 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 5854d05b39..88653457cf 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: PrivateContact + whatsapp-web.js 1.19.4 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 4869cec646..9023672d21 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Product + whatsapp-web.js 1.19.4 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index 9e87af8d3d..edc7531887 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Reaction + whatsapp-web.js 1.19.4 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index fd4105da0a..45d05e71c9 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: RemoteAuth + whatsapp-web.js 1.19.4 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index 319597e77c..beca42ec8a 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Class: Util + whatsapp-web.js 1.19.4 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index be94536986..b1db2b2227 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.19.4 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 8401f76ecb..eed02e9841 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.19.4 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 9ada1154c1..7371cd7bb8 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.19.4 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index fc53dce07c..6d9a06f334 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.19.4 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index f905f8f9d5..cbc37ec812 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.19.4 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index 65047fbd16..0f0fa91794 100644 --- a/docs/global.html +++ b/docs/global.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Globals + whatsapp-web.js 1.19.4 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index d523017ad9..ba6f82b102 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Home + whatsapp-web.js 1.19.4 » Home @@ -15,7 +15,7 @@ @@ -27,11 +27,11 @@
-

npm Depfu WhatsApp_Web 2.2301.6 Discord Chat

+

npm Depfu WhatsApp_Web 2.2306.7 Discord Chat

whatsapp-web.js

A WhatsApp API client that connects through the WhatsApp Web browser app

It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

@@ -3281,7 +3281,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index d028984c01..ecd596e423 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Base.js + whatsapp-web.js 1.19.4 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 0f575efdc8..9a97e69582 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/BusinessContact.js + whatsapp-web.js 1.19.4 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index d5baa7f1ec..2ea9add92f 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Buttons.js + whatsapp-web.js 1.19.4 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index b2fd323853..9d9593b7eb 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Call.js + whatsapp-web.js 1.19.4 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -114,7 +114,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 6997d816d8..70eb9e2709 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Chat.js + whatsapp-web.js 1.19.4 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 4c4003f440..790e591e59 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/ClientInfo.js + whatsapp-web.js 1.19.4 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index ebbaf094b9..96f2323c03 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Contact.js + whatsapp-web.js 1.19.4 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index c8fd25e043..badebae3fe 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/GroupChat.js + whatsapp-web.js 1.19.4 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -294,7 +294,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 8c6e3b6c43..9ef074dd61 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/GroupNotification.js + whatsapp-web.js 1.19.4 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 77bebb739c..01aed26829 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Label.js + whatsapp-web.js 1.19.4 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index b33b8a713f..e18dfd4503 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/List.js + whatsapp-web.js 1.19.4 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 3d614df1bc..9707f6b2ae 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Location.js + whatsapp-web.js 1.19.4 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index b57e883181..e5676a233c 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Message.js + whatsapp-web.js 1.19.4 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -573,7 +573,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 5d8cf742aa..d52fd3b860 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/MessageMedia.js + whatsapp-web.js 1.19.4 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index dca025ebfb..f2d76fb4c7 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Order.js + whatsapp-web.js 1.19.4 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 4cf4d1f4cb..0d56ba40d6 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Payment.js + whatsapp-web.js 1.19.4 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index ea8345b2a8..ff74a37c2c 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/PrivateChat.js + whatsapp-web.js 1.19.4 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 00d3549568..7f14e299f2 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/PrivateContact.js + whatsapp-web.js 1.19.4 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index a81ff9583d..882d704b1e 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Product.js + whatsapp-web.js 1.19.4 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index aac678148b..c4a071d26a 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.19.4 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index b03702fa27..1dfda612b2 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: structures/Reaction.js + whatsapp-web.js 1.19.4 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 6fa4463fc5..7b66690cfa 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: util/Constants.js + whatsapp-web.js 1.19.4 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index d4a7f1f90e..cc963e9331 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: util/InterfaceController.js + whatsapp-web.js 1.19.4 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -164,7 +164,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index dec3fc7fde..539ac5d694 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.3 » Source: util/Util.js + whatsapp-web.js 1.19.4 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index b51832e9e2..49c6d7801e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.19.3", + "version": "1.19.4", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 109fbce8db698ca12ac81af13bc69090a645d5b2 Mon Sep 17 00:00:00 2001 From: Italo Castro <72866245+Italo-Castro@users.noreply.github.com> Date: Sat, 18 Mar 2023 19:11:38 -0300 Subject: [PATCH 041/139] Fix Message.js (#2080) Fixes https://github.com/pedroslopez/whatsapp-web.js/issues/2078 --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 867bd888ee..2e16ed7755 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -403,7 +403,7 @@ class Message extends Base { } try { - const decryptedMedia = await window.Store.DownloadManager.downloadAndDecrypt({ + const decryptedMedia = await window.Store.DownloadManager.downloadAndMaybeDecrypt({ directPath: msg.directPath, encFilehash: msg.encFilehash, filehash: msg.filehash, From 185465664845bb9f6b37915e20e77683b4397a6e Mon Sep 17 00:00:00 2001 From: Macley Sousa Date: Sat, 18 Mar 2023 19:12:39 -0300 Subject: [PATCH 042/139] fix: send media (#2074) --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 28cc069a66..dbae6c2933 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -17,7 +17,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.Invite = window.mR.findModule('resetGroupInviteCode')[0]; window.Store.InviteInfo = window.mR.findModule('queryGroupInvite')[0]; window.Store.Label = window.mR.findModule('LabelCollection')[0].LabelCollection; - window.Store.MediaPrep = window.mR.findModule('MediaPrep')[0]; + window.Store.MediaPrep = window.mR.findModule('prepRawMedia')[0]; window.Store.MediaObject = window.mR.findModule('getOrCreateMediaObject')[0]; window.Store.NumberInfo = window.mR.findModule('formattedPhoneNumber')[0]; window.Store.MediaTypes = window.mR.findModule('msgToMediaType')[0]; From ea6c130edd355edb1ef8d93cb9c015785d053828 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Sat, 18 Mar 2023 18:17:59 -0400 Subject: [PATCH 043/139] chore: mark version v1.19.5 --- docs/Base.html | 8 ++++---- docs/BaseAuthStrategy.html | 8 ++++---- docs/BusinessContact.html | 8 ++++---- docs/Buttons.html | 8 ++++---- docs/Call.html | 8 ++++---- docs/Chat.html | 8 ++++---- docs/Client.html | 8 ++++---- docs/Client.js.html | 8 ++++---- docs/ClientInfo.html | 8 ++++---- docs/Contact.html | 8 ++++---- docs/GroupChat.html | 8 ++++---- docs/GroupNotification.html | 8 ++++---- docs/InterfaceController.html | 8 ++++---- docs/Label.html | 8 ++++---- docs/LegacySessionAuth.html | 8 ++++---- docs/List.html | 8 ++++---- docs/LocalAuth.html | 8 ++++---- docs/Location.html | 8 ++++---- docs/Message.html | 8 ++++---- docs/MessageMedia.html | 8 ++++---- docs/NoAuth.html | 8 ++++---- docs/Order.html | 8 ++++---- docs/PrivateChat.html | 8 ++++---- docs/PrivateContact.html | 8 ++++---- docs/Product.html | 8 ++++---- docs/Reaction.html | 8 ++++---- docs/RemoteAuth.html | 8 ++++---- docs/Util.html | 8 ++++---- docs/authStrategies_BaseAuthStrategy.js.html | 8 ++++---- docs/authStrategies_LegacySessionAuth.js.html | 8 ++++---- docs/authStrategies_LocalAuth.js.html | 8 ++++---- docs/authStrategies_NoAuth.js.html | 8 ++++---- docs/authStrategies_RemoteAuth.js.html | 8 ++++---- docs/global.html | 8 ++++---- docs/index.html | 10 +++++----- docs/structures_Base.js.html | 8 ++++---- docs/structures_BusinessContact.js.html | 8 ++++---- docs/structures_Buttons.js.html | 8 ++++---- docs/structures_Call.js.html | 8 ++++---- docs/structures_Chat.js.html | 8 ++++---- docs/structures_ClientInfo.js.html | 8 ++++---- docs/structures_Contact.js.html | 8 ++++---- docs/structures_GroupChat.js.html | 8 ++++---- docs/structures_GroupNotification.js.html | 8 ++++---- docs/structures_Label.js.html | 8 ++++---- docs/structures_List.js.html | 8 ++++---- docs/structures_Location.js.html | 8 ++++---- docs/structures_Message.js.html | 10 +++++----- docs/structures_MessageMedia.js.html | 8 ++++---- docs/structures_Order.js.html | 8 ++++---- docs/structures_Payment.js.html | 8 ++++---- docs/structures_PrivateChat.js.html | 8 ++++---- docs/structures_PrivateContact.js.html | 8 ++++---- docs/structures_Product.js.html | 8 ++++---- docs/structures_ProductMetadata.js.html | 8 ++++---- docs/structures_Reaction.js.html | 8 ++++---- docs/util_Constants.js.html | 8 ++++---- docs/util_InterfaceController.js.html | 8 ++++---- docs/util_Util.js.html | 8 ++++---- package.json | 2 +- 60 files changed, 239 insertions(+), 239 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 34a43c616f..8b72b80521 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Base + whatsapp-web.js 1.19.5 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index b2336f62a2..45b4f5d15d 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: BaseAuthStrategy + whatsapp-web.js 1.19.5 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 9bb7455e47..8ca34628a7 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: BusinessContact + whatsapp-web.js 1.19.5 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index 57318d0cfa..db66dc31f4 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Buttons + whatsapp-web.js 1.19.5 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index ae81bbd596..2ed0b0d76a 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Call + whatsapp-web.js 1.19.5 » Class: Call @@ -15,7 +15,7 @@ @@ -168,7 +168,7 @@

reject<
diff --git a/docs/Chat.html b/docs/Chat.html index d89649c05d..48ef3299c2 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Chat + whatsapp-web.js 1.19.5 » Class: Chat @@ -15,7 +15,7 @@ @@ -497,7 +497,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 5cc9d96c9c..01ef7bb4a6 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Client + whatsapp-web.js 1.19.5 » Class: Client @@ -15,7 +15,7 @@ @@ -2486,7 +2486,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index 56d491489c..6a180d7c51 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: Client.js + whatsapp-web.js 1.19.5 » Source: Client.js @@ -15,7 +15,7 @@ @@ -1222,7 +1222,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 12eb526eb7..02211359be 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: ClientInfo + whatsapp-web.js 1.19.5 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index 30565a59fe..29a9d00552 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Contact + whatsapp-web.js 1.19.5 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index 0fdfebe531..a27f22dedc 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: GroupChat + whatsapp-web.js 1.19.5 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -941,7 +941,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 7fa5668246..739b7a2e7c 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: GroupNotification + whatsapp-web.js 1.19.5 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 76633f31b7..862364ce49 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: InterfaceController + whatsapp-web.js 1.19.5 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index 2973917522..da6fac5546 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Label + whatsapp-web.js 1.19.5 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index 38f23faf75..b248e58d57 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: LegacySessionAuth + whatsapp-web.js 1.19.5 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index c85f364500..f2c4affe3d 100644 --- a/docs/List.html +++ b/docs/List.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: List + whatsapp-web.js 1.19.5 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 8a7d37b064..1a4f18a4b1 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: LocalAuth + whatsapp-web.js 1.19.5 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index a10bcc07ce..0c80012040 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Location + whatsapp-web.js 1.19.5 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index 62418d3a75..d528a725d3 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Message + whatsapp-web.js 1.19.5 » Class: Message @@ -15,7 +15,7 @@ @@ -650,7 +650,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 2a1a81be60..17046c4077 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: MessageMedia + whatsapp-web.js 1.19.5 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index e637049342..1ee676e048 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: NoAuth + whatsapp-web.js 1.19.5 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index aaee8eeb60..a116147fe3 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Order + whatsapp-web.js 1.19.5 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index c27f59497b..d903c67246 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: PrivateChat + whatsapp-web.js 1.19.5 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -533,7 +533,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 88653457cf..b41f3e9cb2 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: PrivateContact + whatsapp-web.js 1.19.5 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 9023672d21..549ce626f0 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Product + whatsapp-web.js 1.19.5 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index edc7531887..ade180ce7e 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Reaction + whatsapp-web.js 1.19.5 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 45d05e71c9..077388e30b 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: RemoteAuth + whatsapp-web.js 1.19.5 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index beca42ec8a..ca629bade4 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Class: Util + whatsapp-web.js 1.19.5 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index b1db2b2227..2d02c68cc4 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.19.5 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index eed02e9841..3c9e0d3e95 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.19.5 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 7371cd7bb8..9b370062d2 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.19.5 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 6d9a06f334..6321c1d00f 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.19.5 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index cbc37ec812..b4a777fc2e 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.19.5 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index 0f0fa91794..50c2cb31a2 100644 --- a/docs/global.html +++ b/docs/global.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Globals + whatsapp-web.js 1.19.5 » Globals @@ -15,7 +15,7 @@ @@ -2019,7 +2019,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index ba6f82b102..17e9fb8402 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Home + whatsapp-web.js 1.19.5 » Home @@ -15,7 +15,7 @@ @@ -27,7 +27,7 @@
@@ -3281,7 +3281,7 @@

WAState

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index ecd596e423..9298998739 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Base.js + whatsapp-web.js 1.19.5 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 9a97e69582..3b5feb76e9 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/BusinessContact.js + whatsapp-web.js 1.19.5 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 2ea9add92f..7637c6ca05 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Buttons.js + whatsapp-web.js 1.19.5 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 9d9593b7eb..09504d6944 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Call.js + whatsapp-web.js 1.19.5 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -114,7 +114,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 70eb9e2709..e470070c97 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Chat.js + whatsapp-web.js 1.19.5 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -299,7 +299,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 790e591e59..5c59f8448d 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/ClientInfo.js + whatsapp-web.js 1.19.5 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 96f2323c03..9659220f02 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Contact.js + whatsapp-web.js 1.19.5 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index badebae3fe..03ef7ee6ac 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/GroupChat.js + whatsapp-web.js 1.19.5 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -294,7 +294,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 9ef074dd61..8885d690d3 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/GroupNotification.js + whatsapp-web.js 1.19.5 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 01aed26829..0085387f54 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Label.js + whatsapp-web.js 1.19.5 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index e18dfd4503..4939fa15bd 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/List.js + whatsapp-web.js 1.19.5 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 9707f6b2ae..2e263b664b 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Location.js + whatsapp-web.js 1.19.5 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index e5676a233c..42962cb01a 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Message.js + whatsapp-web.js 1.19.5 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -434,7 +434,7 @@

Source: structures/Message.js

} try { - const decryptedMedia = await window.Store.DownloadManager.downloadAndDecrypt({ + const decryptedMedia = await window.Store.DownloadManager.downloadAndMaybeDecrypt({ directPath: msg.directPath, encFilehash: msg.encFilehash, filehash: msg.filehash, @@ -573,7 +573,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index d52fd3b860..5648e76c25 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/MessageMedia.js + whatsapp-web.js 1.19.5 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index f2d76fb4c7..3da4befad2 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Order.js + whatsapp-web.js 1.19.5 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 0d56ba40d6..2392de0997 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Payment.js + whatsapp-web.js 1.19.5 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index ff74a37c2c..46d5c2ee8e 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/PrivateChat.js + whatsapp-web.js 1.19.5 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 7f14e299f2..0bf52689eb 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/PrivateContact.js + whatsapp-web.js 1.19.5 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 882d704b1e..6a42dbf231 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Product.js + whatsapp-web.js 1.19.5 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index c4a071d26a..be6fa76ff5 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.19.5 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index 1dfda612b2..e4e4b009a0 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: structures/Reaction.js + whatsapp-web.js 1.19.5 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 7b66690cfa..9389185d78 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: util/Constants.js + whatsapp-web.js 1.19.5 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -200,7 +200,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index cc963e9331..17abf6d599 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: util/InterfaceController.js + whatsapp-web.js 1.19.5 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -164,7 +164,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index 539ac5d694..ee2b4b4c50 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.4 » Source: util/Util.js + whatsapp-web.js 1.19.5 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index 49c6d7801e..012bff6717 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.19.4", + "version": "1.19.5", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 48466251196197467673f3a21f8418586c2c671f Mon Sep 17 00:00:00 2001 From: Mohammed Khan <60229505+saifkhan7865@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:20:23 +0530 Subject: [PATCH 044/139] fixed version id number (#2087) --- src/util/Injected.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index dbae6c2933..229220ca91 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -41,7 +41,7 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.ProfilePic = window.mR.findModule('profilePicResync')[0]; window.Store.PresenceUtils = window.mR.findModule('sendPresenceAvailable')[0]; window.Store.ChatState = window.mR.findModule('sendChatStateComposing')[0]; - window.Store.GroupParticipants = window.mR.findModule('promoteParticipants')[1]; + window.Store.GroupParticipants = window.mR.findModule('promoteParticipants')[0]; window.Store.JoinInviteV4 = window.mR.findModule('sendJoinGroupViaInviteV4')[0]; window.Store.findCommonGroups = window.mR.findModule('findCommonGroups')[0].findCommonGroups; window.Store.StatusUtils = window.mR.findModule('setMyStatus')[0]; From dc16bbbdac45e4b40b88662e0c808850f87f627a Mon Sep 17 00:00:00 2001 From: Wictor Nogueira <57378387+wictornogueira@users.noreply.github.com> Date: Fri, 31 Mar 2023 22:21:09 -0300 Subject: [PATCH 045/139] Feat: change profile/group picture (#1916) * feat: pfp * Make eslint happy * Fix typo * Fix missing comma * Update src/util/Injected.js * ESLint * Update src/util/Injected.js * mfw purp breaks indentation --------- Co-authored-by: Rajeh Taher --- index.d.ts | 10 ++++++ src/Client.js | 25 +++++++++++++ src/structures/GroupChat.js | 25 +++++++++++++ src/util/Injected.js | 72 ++++++++++++++++++++++++++++++++++++- 4 files changed, 131 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 6abef660cd..cebbb75a1b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -148,6 +148,12 @@ declare namespace WAWebJS { /** Unmutes the Chat */ unmuteChat(chatId: string): Promise + /** Sets the current user's profile picture */ + setProfilePicture(media: MessageMedia): Promise + + /** Deletes the current user's profile picture */ + deleteProfilePicture(): Promise + /** Generic event */ on(event: string, listener: (...args: any) => void): this @@ -1162,6 +1168,10 @@ declare namespace WAWebJS { revokeInvite: () => Promise; /** Makes the bot leave the group */ leave: () => Promise; + /** Sets the group's picture.*/ + setPicture: (media: MessageMedia) => Promise; + /** Deletes the group's picture */ + deletePicture: () => Promise; } /** diff --git a/src/Client.js b/src/Client.js index 3d87ace7fa..955aadcbc5 100644 --- a/src/Client.js +++ b/src/Client.js @@ -1178,6 +1178,31 @@ class Client extends EventEmitter { return blockedContacts.map(contact => ContactFactory.create(this.client, contact)); } + + /** + * Sets the current user's profile picture. + * @param {MessageMedia} media + * @returns {Promise} Returns true if the picture was properly updated. + */ + async setProfilePicture(media) { + const success = await this.pupPage.evaluate((chatid, media) => { + return window.WWebJS.setPicture(chatid, media); + }, this.info.wid._serialized, media); + + return success; + } + + /** + * Deletes the current user's profile picture. + * @returns {Promise} Returns true if the picture was properly deleted. + */ + async deleteProfilePicture() { + const success = await this.pupPage.evaluate((chatid) => { + return window.WWebJS.deletePicture(chatid); + }, this.info.wid._serialized); + + return success; + } } module.exports = Client; diff --git a/src/structures/GroupChat.js b/src/structures/GroupChat.js index 0be6b62e10..51769a560b 100644 --- a/src/structures/GroupChat.js +++ b/src/structures/GroupChat.js @@ -213,6 +213,31 @@ class GroupChat extends Chat { return true; } + /** + * Deletes the group's picture. + * @returns {Promise} Returns true if the picture was properly deleted. This can return false if the user does not have the necessary permissions. + */ + async deletePicture() { + const success = await this.client.pupPage.evaluate((chatid) => { + return window.WWebJS.deletePicture(chatid); + }, this.id._serialized); + + return success; + } + + /** + * Sets the group's picture. + * @param {MessageMedia} media + * @returns {Promise} Returns true if the picture was properly updated. This can return false if the user does not have the necessary permissions. + */ + async setPicture(media) { + const success = await this.client.pupPage.evaluate((chatid, media) => { + return window.WWebJS.setPicture(chatid, media); + }, this.id._serialized, media); + + return success; + } + /** * Gets the invite code for a specific group * @returns {Promise} Group's invite code diff --git a/src/util/Injected.js b/src/util/Injected.js index 229220ca91..b32d50bf7b 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -62,7 +62,8 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.GroupUtils = { ...window.mR.findModule('createGroup')[0], ...window.mR.findModule('setGroupDescription')[0], - ...window.mR.findModule('sendExitGroup')[0] + ...window.mR.findModule('sendExitGroup')[0], + ...window.mR.findModule('sendSetPicture')[0] }; if (!window.Store.Chat._find) { @@ -625,4 +626,73 @@ exports.LoadUtils = () => { ]); await window.Store.Socket.deprecatedCastStanza(stanza); }; + + window.WWebJS.cropAndResizeImage = async (media, options = {}) => { + if (!media.mimetype.includes('image')) + throw new Error('Media is not an image'); + + if (options.mimetype && !options.mimetype.includes('image')) + delete options.mimetype; + + options = Object.assign({ size: 640, mimetype: media.mimetype, quality: .75, asDataUrl: false }, options); + + const img = await new Promise ((resolve, reject) => { + const img = new Image(); + img.onload = () => resolve(img); + img.onerror = reject; + img.src = `data:${media.mimetype};base64,${media.data}`; + }); + + const sl = Math.min(img.width, img.height); + const sx = Math.floor((img.width - sl) / 2); + const sy = Math.floor((img.height - sl) / 2); + + const canvas = document.createElement('canvas'); + canvas.width = options.size; + canvas.height = options.size; + + const ctx = canvas.getContext('2d'); + ctx.drawImage(img, sx, sy, sl, sl, 0, 0, options.size, options.size); + + const dataUrl = canvas.toDataURL(options.mimetype, options.quality); + + if (options.asDataUrl) + return dataUrl; + + return Object.assign(media, { + mimetype: options.mimeType, + data: dataUrl.replace(`data:${options.mimeType};base64,`, '') + }); + }; + + window.WWebJS.setPicture = async (chatid, media) => { + const thumbnail = await window.WWebJS.cropAndResizeImage(media, { asDataUrl: true, mimetype: 'image/jpeg', size: 96 }); + const profilePic = await window.WWebJS.cropAndResizeImage(media, { asDataUrl: true, mimetype: 'image/jpeg', size: 640 }); + + const chatWid = window.Store.WidFactory.createWid(chatid); + try { + const collection = window.Store.ProfilePicThumb.get(chatid); + if (!collection.canSet()) return; + + const res = await window.Store.GroupUtils.sendSetPicture(chatWid, thumbnail, profilePic); + return res ? res.status === 200 : false; + } catch (err) { + if(err.name === 'ServerStatusCodeError') return false; + throw err; + } + }; + + window.WWebJS.deletePicture = async (chatid) => { + const chatWid = window.Store.WidFactory.createWid(chatid); + try { + const collection = window.Store.ProfilePicThumb.get(chatid); + if (!collection.canDelete()) return; + + const res = await window.Store.GroupUtils.requestDeletePicture(chatWid); + return res ? res.status === 200 : false; + } catch (err) { + if(err.name === 'ServerStatusCodeError') return false; + throw err; + } + }; }; From c44af204a1e79308dc6720a3d90a60bc4dd7cff3 Mon Sep 17 00:00:00 2001 From: Vinicius Tavares Date: Sat, 1 Apr 2023 10:59:57 -0300 Subject: [PATCH 046/139] Add the 'unread_count' event. Listen to changes on Chat.unreadCount (#2059) * Initial commit * Update index.d.ts * The functions was returning a 'brief' chat data. With this, it will return full Chat model.. * Eslint suggested fixex --------- Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com> Co-authored-by: Rajeh Taher --- index.d.ts | 6 ++++++ src/Client.js | 12 +++++++++++- src/util/Constants.js | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index cebbb75a1b..b16a20f90d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -223,6 +223,12 @@ declare namespace WAWebJS { /** The new ACK value */ ack: MessageAck ) => void): this + + /** Emitted when a chat unread count changes */ + on(event: 'unread_count', listener: ( + /** The chat that was affected */ + chat: Chat + ) => void): this /** Emitted when a new message is created, which may include the current user's own messages */ on(event: 'message_create', listener: ( diff --git a/src/Client.js b/src/Client.js index 955aadcbc5..acd04ac7af 100644 --- a/src/Client.js +++ b/src/Client.js @@ -407,6 +407,15 @@ class Client extends EventEmitter { }); + await page.exposeFunction('onChatUnreadCountEvent', async (data) =>{ + const chat = await this.getChatById(data.id); + + /** + * Emitted when the chat unread count changes + */ + this.emit(Events.UNREAD_COUNT, chat); + }); + await page.exposeFunction('onMessageMediaUploadedEvent', (msg) => { const message = new Message(this, msg); @@ -526,7 +535,8 @@ class Client extends EventEmitter { } } }); - + window.Store.Chat.on('change:unreadCount', (chat) => {window.onChatUnreadCountEvent(chat);}); + { const module = window.Store.createOrUpdateReactionsModule; const ogMethod = module.createOrUpdateReactions; diff --git a/src/util/Constants.js b/src/util/Constants.js index 4c22fa138d..e341b4cb2d 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -41,6 +41,7 @@ exports.Events = { MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone', MESSAGE_REVOKED_ME: 'message_revoke_me', MESSAGE_ACK: 'message_ack', + UNREAD_COUNT: 'unread_count', MESSAGE_REACTION: 'message_reaction', MEDIA_UPLOADED: 'media_uploaded', GROUP_JOIN: 'group_join', From 780005a81ac7376ef218833e51632d3fa4477609 Mon Sep 17 00:00:00 2001 From: tofers Date: Sat, 1 Apr 2023 17:03:21 +0300 Subject: [PATCH 047/139] feat: load reactions in message (#1897) * msg find reactions * reaction list * return hasReaction only true or false --------- Co-authored-by: Rajeh Taher --- index.d.ts | 14 ++++++++++++ src/structures/Message.js | 47 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index b16a20f90d..fa36547954 100644 --- a/index.d.ts +++ b/index.d.ts @@ -649,6 +649,7 @@ declare namespace WAWebJS { * broadcast: false, * fromMe: false, * hasQuotedMsg: false, + * hasReaction: false, * location: undefined, * mentionedIds: [] * } @@ -678,6 +679,8 @@ declare namespace WAWebJS { hasMedia: boolean, /** Indicates if the message was sent as a reply to another message */ hasQuotedMsg: boolean, + /** Indicates whether there are reactions to the message */ + hasReaction: boolean, /** Indicates the duration of the message in seconds */ duration: string, /** ID that represents the message */ @@ -779,6 +782,10 @@ declare namespace WAWebJS { * Gets the payment details associated with a given message */ getPayment: () => Promise, + /** + * Gets the reactions associated with the given message + */ + getReactions: () => Promise, } /** ID that represents a message */ @@ -1381,6 +1388,13 @@ declare namespace WAWebJS { senderId: string ack?: number } + + export type ReactionList = { + id: string, + aggregateEmoji: string, + hasReactionByMe: boolean, + senders: Array + } } export = WAWebJS diff --git a/src/structures/Message.js b/src/structures/Message.js index 2e16ed7755..87d716311d 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -5,7 +5,8 @@ const MessageMedia = require('./MessageMedia'); const Location = require('./Location'); const Order = require('./Order'); const Payment = require('./Payment'); -const { MessageTypes } = require('../util/Constants'); +const Reaction = require('./Reaction'); +const {MessageTypes} = require('../util/Constants'); /** * Represents a Message on WhatsApp @@ -134,6 +135,12 @@ class Message extends Base { */ this.hasQuotedMsg = data.quotedMsg ? true : false; + /** + * Indicates whether there are reactions to the message + * @type {boolean} + */ + this.hasReaction = data.hasReaction ? true : false; + /** * Indicates the duration of the message in seconds * @type {string} @@ -529,6 +536,44 @@ class Message extends Base { } return undefined; } + + + /** + * Reaction List + * @typedef {Object} ReactionList + * @property {string} id Original emoji + * @property {string} aggregateEmoji aggregate emoji + * @property {boolean} hasReactionByMe Flag who sent the reaction + * @property {Array} senders Reaction senders, to this message + */ + + /** + * Gets the reactions associated with the given message + * @return {Promise} + */ + async getReactions() { + if (!this.hasReaction) { + return undefined; + } + + const reactions = await this.client.pupPage.evaluate(async (msgId) => { + const msgReactions = await window.Store.Reactions.find(msgId); + if (!msgReactions || !msgReactions.reactions.length) return null; + return msgReactions.reactions.serialize(); + }, this.id._serialized); + + if (!reactions) { + return undefined; + } + + return reactions.map(reaction => { + reaction.senders = reaction.senders.map(sender => { + sender.timestamp = Math.round(sender.timestamp / 1000); + return new Reaction(this.client, sender); + }); + return reaction; + }); + } } module.exports = Message; From 812ff0ddfcf17e0879e5e272ba4485d295efaa29 Mon Sep 17 00:00:00 2001 From: tofers Date: Sat, 1 Apr 2023 17:07:39 +0300 Subject: [PATCH 048/139] lastMessage in chat (#1606) * lastMessage in chat * lastMessage info * Update src/util/Injected.js Co-authored-by: Rajeh Taher * fix serialize msg * markup --------- Co-authored-by: tofers Co-authored-by: Rajeh Taher --- index.d.ts | 2 ++ src/structures/Chat.js | 6 ++++++ src/util/Injected.js | 10 +++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index fa36547954..ec7ff4c85c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1038,6 +1038,8 @@ declare namespace WAWebJS { timestamp: number, /** Amount of messages unread */ unreadCount: number, + /** Last message fo chat */ + lastMessage: Message, /** Archives this chat */ archive: () => Promise, diff --git a/src/structures/Chat.js b/src/structures/Chat.js index 241d297d92..0e0ae78d83 100644 --- a/src/structures/Chat.js +++ b/src/structures/Chat.js @@ -75,6 +75,12 @@ class Chat extends Base { */ this.muteExpiration = data.muteExpiration; + /** + * Last message fo chat + * @type {Message} + */ + this.lastMessage = data.lastMessage ? new Message(super.client, data.lastMessage) : undefined; + return super._patch(data); } diff --git a/src/util/Injected.js b/src/util/Injected.js index b32d50bf7b..c9a7638a52 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -427,7 +427,15 @@ exports.LoadUtils = () => { await window.Store.GroupMetadata.update(chatWid); res.groupMetadata = chat.groupMetadata.serialize(); } - + + res.lastMessage = null; + if (res.msgs && res.msgs.length) { + const lastMessage = window.Store.Msg.get(chat.lastReceivedKey._serialized); + if (lastMessage) { + res.lastMessage = window.WWebJS.getMessageModel(lastMessage); + } + } + delete res.msgs; delete res.msgUnsyncedButtonReplyMsgs; delete res.unsyncedButtonReplies; From ac7df25075dc5efd5f8718a2ead6d3b47683bd9c Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sat, 1 Apr 2023 17:09:28 +0300 Subject: [PATCH 049/139] Fix media renders (#1981) * Fixed * Update src/util/Injected.js --------- Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com> --- src/util/Injected.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/Injected.js b/src/util/Injected.js index c9a7638a52..cf812a9f98 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -272,6 +272,7 @@ exports.LoadUtils = () => { ...ephemeralFields, ...locationOptions, ...attOptions, + ...(attOptions.toJSON ? attOptions.toJSON() : {}), ...quotedMsgOptions, ...vcardOptions, ...buttonOptions, From 9f154995920da2bab0833664c6e216ed6f485687 Mon Sep 17 00:00:00 2001 From: alechkos <93551621+alechkos@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:40:47 +0300 Subject: [PATCH 050/139] feat: added group_admin_changed event (#2018) * docs: updated * added group-admin-change event * minor changes * added usage example * minor changes: code docs updated --- example.js | 11 +++++++++++ index.d.ts | 7 +++++++ src/Client.js | 8 ++++++++ src/util/Constants.js | 1 + 4 files changed, 27 insertions(+) diff --git a/example.js b/example.js index 9e5eec59c8..7187b6f319 100644 --- a/example.js +++ b/example.js @@ -270,3 +270,14 @@ client.on('disconnected', (reason) => { console.log('Client was logged out', reason); }); +client.on('group_admin_changed', (notification) => { + if (notification.type === 'promote') { + /** + * Emitted when a current user is promoted to an admin. + * {@link notification.author} is a user who performs the action of promoting/demoting the current user. + */ + console.log(`You were promoted by ${notification.author}`); + } else if (notification.type === 'demote') + /** Emitted when a current user is demoted to a regular user. */ + console.log(`You were demoted by ${notification.author}`); +}); diff --git a/index.d.ts b/index.d.ts index ec7ff4c85c..1e94099c68 100644 --- a/index.d.ts +++ b/index.d.ts @@ -198,6 +198,12 @@ declare namespace WAWebJS { notification: GroupNotification ) => void): this + /** Emitted when a current user is promoted to an admin or demoted to a regular user */ + on(event: 'group_admin_changed', listener: ( + /** GroupNotification with more information about the action */ + notification: GroupNotification + ) => void): this + /** Emitted when group settings are updated, such as subject, description or picture */ on(event: 'group_update', listener: ( /** GroupNotification with more information about the action */ @@ -512,6 +518,7 @@ declare namespace WAWebJS { MEDIA_UPLOADED = 'media_uploaded', GROUP_JOIN = 'group_join', GROUP_LEAVE = 'group_leave', + GROUP_ADMIN_CHANGED = 'group_admin_changed', GROUP_UPDATE = 'group_update', QR_RECEIVED = 'qr', LOADING_SCREEN = 'loading_screen', diff --git a/src/Client.js b/src/Client.js index acd04ac7af..586fee8fdc 100644 --- a/src/Client.js +++ b/src/Client.js @@ -45,6 +45,7 @@ const NoAuth = require('./authStrategies/NoAuth'); * @fires Client#group_update * @fires Client#disconnected * @fires Client#change_state + * @fires Client#group_admin_changed */ class Client extends EventEmitter { constructor(options = {}) { @@ -317,6 +318,13 @@ class Client extends EventEmitter { * @param {GroupNotification} notification GroupNotification with more information about the action */ this.emit(Events.GROUP_LEAVE, notification); + } else if (msg.subtype === 'promote' || msg.subtype === 'demote') { + /** + * Emitted when a current user is promoted to an admin or demoted to a regular user. + * @event Client#group_admin_changed + * @param {GroupNotification} notification GroupNotification with more information about the action + */ + this.emit(Events.GROUP_ADMIN_CHANGED, notification); } else { /** * Emitted when group settings are updated, such as subject, description or picture. diff --git a/src/util/Constants.js b/src/util/Constants.js index e341b4cb2d..39c85df181 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -46,6 +46,7 @@ exports.Events = { MEDIA_UPLOADED: 'media_uploaded', GROUP_JOIN: 'group_join', GROUP_LEAVE: 'group_leave', + GROUP_ADMIN_CHANGED: 'group_admin_changed', GROUP_UPDATE: 'group_update', QR_RECEIVED: 'qr', LOADING_SCREEN: 'loading_screen', From f44555713d1b5de2e999c3a0e46bae9a868cc5f9 Mon Sep 17 00:00:00 2001 From: Wictor Nogueira <57378387+wictornogueira@users.noreply.github.com> Date: Sat, 1 Apr 2023 16:19:11 -0300 Subject: [PATCH 051/139] Feat: Add chat_removed and chat_archived events (#1778) * Add chat_removed and chat_archived events * Make eslint happy --------- Co-authored-by: Rajeh Taher Co-authored-by: Aliyss Snow <33941859+Aliyss@users.noreply.github.com> --- index.d.ts | 16 ++++++++++++++++ src/Client.js | 24 +++++++++++++++++++++++- src/util/Constants.js | 2 ++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 1e94099c68..98e3a19fb9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -265,6 +265,22 @@ declare namespace WAWebJS { reaction: Reaction ) => void): this + /** Emitted when a chat is removed */ + on(event: 'chat_removed', listener: ( + /** The chat that was removed */ + chat: Chat + ) => void): this + + /** Emitted when a chat is archived/unarchived */ + on(event: 'chat_archived', listener: ( + /** The chat that was archived/unarchived */ + chat: Chat, + /** State the chat is currently in */ + currState: boolean, + /** State the chat was previously in */ + prevState: boolean + ) => void): this + /** Emitted when loading screen is appearing */ on(event: 'loading_screen', listener: (percent: string, message: string) => void): this diff --git a/src/Client.js b/src/Client.js index 586fee8fdc..5ed011414a 100644 --- a/src/Client.js +++ b/src/Client.js @@ -10,7 +10,7 @@ const { WhatsWebURL, DefaultOptions, Events, WAState } = require('./util/Constan const { ExposeStore, LoadUtils } = require('./util/Injected'); const ChatFactory = require('./factories/ChatFactory'); const ContactFactory = require('./factories/ContactFactory'); -const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List, Reaction } = require('./structures'); +const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List, Reaction, Chat } = require('./structures'); const LegacySessionAuth = require('./authStrategies/LegacySessionAuth'); const NoAuth = require('./authStrategies/NoAuth'); @@ -524,6 +524,26 @@ class Client extends EventEmitter { } }); + await page.exposeFunction('onRemoveChatEvent', (chat) => { + /** + * Emitted when a chat is removed + * @event Client#chat_removed + * @param {Chat} chat + */ + this.emit(Events.CHAT_REMOVED, new Chat(this, chat)); + }); + + await page.exposeFunction('onArchiveChatEvent', (chat, currState, prevState) => { + /** + * Emitted when a chat is archived/unarchived + * @event Client#chat_archived + * @param {Chat} chat + * @param {boolean} currState + * @param {boolean} prevState + */ + this.emit(Events.CHAT_ARCHIVED, new Chat(this, chat), currState, prevState); + }); + await page.evaluate(() => { 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)); }); @@ -533,6 +553,8 @@ class Client extends EventEmitter { window.Store.AppState.on('change:state', (_AppState, state) => { window.onAppStateChangedEvent(state); }); window.Store.Conn.on('change:battery', (state) => { window.onBatteryStateChangedEvent(state); }); window.Store.Call.on('add', (call) => { window.onIncomingCall(call); }); + window.Store.Chat.on('remove', async (chat) => { window.onRemoveChatEvent(await window.WWebJS.getChatModel(chat)); }); + window.Store.Chat.on('change:archive', async (chat, currState, prevState) => { window.onArchiveChatEvent(await window.WWebJS.getChatModel(chat), currState, prevState); }); window.Store.Msg.on('add', (msg) => { if (msg.isNewMsg) { if(msg.type === 'ciphertext') { diff --git a/src/util/Constants.js b/src/util/Constants.js index 39c85df181..2d77de0e4a 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -36,6 +36,8 @@ exports.Events = { AUTHENTICATED: 'authenticated', AUTHENTICATION_FAILURE: 'auth_failure', READY: 'ready', + CHAT_REMOVED: 'chat_removed', + CHAT_ARCHIVED: 'chat_archived', MESSAGE_RECEIVED: 'message', MESSAGE_CREATE: 'message_create', MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone', From f23ab825655b620e0b977468f5719b7bf5126ee3 Mon Sep 17 00:00:00 2001 From: alechkos <93551621+alechkos@users.noreply.github.com> Date: Sat, 1 Apr 2023 22:30:12 +0300 Subject: [PATCH 052/139] feat: added contact_changed event (#2027) --- example.js | 49 +++++++++++++++++++++++++++++++++++++------ index.d.ts | 13 ++++++++++++ src/Client.js | 31 +++++++++++++++++++++++++++ src/util/Constants.js | 1 + 4 files changed, 88 insertions(+), 6 deletions(-) diff --git a/example.js b/example.js index 7187b6f319..f00b1303b6 100644 --- a/example.js +++ b/example.js @@ -1,4 +1,4 @@ -const { Client, Location, List, Buttons, LocalAuth} = require('./index'); +const { Client, Location, List, Buttons, LocalAuth } = require('./index'); const client = new Client({ authStrategy: new LocalAuth(), @@ -189,11 +189,11 @@ client.on('message', async msg => { client.interface.openChatWindowAt(quotedMsg.id._serialized); } } else if (msg.body === '!buttons') { - let button = new Buttons('Button body',[{body:'bt1'},{body:'bt2'},{body:'bt3'}],'title','footer'); + let button = new Buttons('Button body', [{ body: 'bt1' }, { body: 'bt2' }, { body: 'bt3' }], 'title', 'footer'); client.sendMessage(msg.from, button); } else if (msg.body === '!list') { - let sections = [{title:'sectionTitle',rows:[{title:'ListItem1', description: 'desc'},{title:'ListItem2'}]}]; - let list = new List('List body','btnText',sections,'Title','footer'); + let sections = [{ title: 'sectionTitle', rows: [{ title: 'ListItem1', description: 'desc' }, { title: 'ListItem2' }] }]; + let list = new List('List body', 'btnText', sections, 'Title', 'footer'); client.sendMessage(msg.from, list); } else if (msg.body === '!reaction') { msg.react('👍'); @@ -231,7 +231,7 @@ client.on('message_ack', (msg, ack) => { ACK_PLAYED: 4 */ - if(ack == 3) { + if (ack == 3) { // The message was read } }); @@ -254,7 +254,7 @@ client.on('group_update', (notification) => { }); client.on('change_state', state => { - console.log('CHANGE STATE', state ); + console.log('CHANGE STATE', state); }); // Change to false if you don't want to reject incoming calls @@ -270,6 +270,43 @@ client.on('disconnected', (reason) => { console.log('Client was logged out', reason); }); +client.on('contact_changed', async (message, oldId, newId, isContact) => { + /** The time the event occurred. */ + const eventTime = (new Date(message.timestamp * 1000)).toLocaleString(); + + console.log( + `The contact ${oldId.slice(0, -5)}` + + `${!isContact ? ' that participates in group ' + + `${(await client.getChatById(message.to ?? message.from)).name} ` : ' '}` + + `changed their phone number\nat ${eventTime}.\n` + + `Their new phone number is ${newId.slice(0, -5)}.\n`); + + /** + * Information about the {@name message}: + * + * 1. If a notification was emitted due to a group participant changing their phone number: + * {@name message.author} is a participant's id before the change. + * {@name message.recipients[0]} is a participant's id after the change (a new one). + * + * 1.1 If the contact who changed their number WAS in the current user's contact list at the time of the change: + * {@name message.to} is a group chat id the event was emitted in. + * {@name message.from} is a current user's id that got an notification message in the group. + * Also the {@name message.fromMe} is TRUE. + * + * 1.2 Otherwise: + * {@name message.from} is a group chat id the event was emitted in. + * {@name message.to} is @type {undefined}. + * Also {@name message.fromMe} is FALSE. + * + * 2. If a notification was emitted due to a contact changing their phone number: + * {@name message.templateParams} is an array of two user's ids: + * the old (before the change) and a new one, stored in alphabetical order. + * {@name message.from} is a current user's id that has a chat with a user, + * whos phone number was changed. + * {@name message.to} is a user's id (after the change), the current user has a chat with. + */ +}); + client.on('group_admin_changed', (notification) => { if (notification.type === 'promote') { /** diff --git a/index.d.ts b/index.d.ts index 98e3a19fb9..23ba35cd45 100644 --- a/index.d.ts +++ b/index.d.ts @@ -210,6 +210,18 @@ declare namespace WAWebJS { notification: GroupNotification ) => void): this + /** Emitted when a contact or a group participant changed their phone number. */ + on(event: 'contact_changed', listener: ( + /** Message with more information about the event. */ + message: Message, + /** Old user's id. */ + oldId : String, + /** New user's id. */ + newId : String, + /** Indicates if a contact or a group participant changed their phone number. */ + isContact : Boolean + ) => void): this + /** Emitted when media has been uploaded for a message sent by the client */ on(event: 'media_uploaded', listener: ( /** The message with media that was uploaded */ @@ -532,6 +544,7 @@ declare namespace WAWebJS { MESSAGE_REVOKED_ME = 'message_revoke_me', MESSAGE_ACK = 'message_ack', MEDIA_UPLOADED = 'media_uploaded', + CONTACT_CHANGED = 'contact_changed', GROUP_JOIN = 'group_join', GROUP_LEAVE = 'group_leave', GROUP_ADMIN_CHANGED = 'group_admin_changed', diff --git a/src/Client.js b/src/Client.js index 5ed011414a..d0c949c5d2 100644 --- a/src/Client.js +++ b/src/Client.js @@ -45,6 +45,7 @@ const NoAuth = require('./authStrategies/NoAuth'); * @fires Client#group_update * @fires Client#disconnected * @fires Client#change_state + * @fires Client#contact_changed * @fires Client#group_admin_changed */ class Client extends EventEmitter { @@ -384,6 +385,36 @@ class Client extends EventEmitter { last_message = msg; } + /** + * The event notification that is received when one of + * the group participants changes thier phone number. + */ + const isParticipant = msg.type === 'gp2' && msg.subtype === 'modify'; + + /** + * The event notification that is received when one of + * the contacts changes thier phone number. + */ + const isContact = msg.type === 'notification_template' && msg.subtype === 'change_number'; + + if (isParticipant || isContact) { + /** {@link GroupNotification} object does not provide enough information about this event, so a {@link Message} object is used. */ + const message = new Message(this, msg); + + const newId = isParticipant ? msg.recipients[0] : msg.to; + const oldId = isParticipant ? msg.author : msg.templateParams.find(id => id !== newId); + + /** + * Emitted when a contact or a group participant changes their phone number. + * @event Client#contact_changed + * @param {Message} message Message with more information about the event. + * @param {String} oldId The user's id (an old one) who changed their phone number + * and who triggered the notification. + * @param {String} newId The user's new id after the change. + * @param {Boolean} isContact Indicates if a contact or a group participant changed their phone number. + */ + this.emit(Events.CONTACT_CHANGED, message, oldId, newId, isContact); + } }); await page.exposeFunction('onRemoveMessageEvent', (msg) => { diff --git a/src/util/Constants.js b/src/util/Constants.js index 2d77de0e4a..97512c1b4d 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -46,6 +46,7 @@ exports.Events = { UNREAD_COUNT: 'unread_count', MESSAGE_REACTION: 'message_reaction', MEDIA_UPLOADED: 'media_uploaded', + CONTACT_CHANGED: 'contact_changed', GROUP_JOIN: 'group_join', GROUP_LEAVE: 'group_leave', GROUP_ADMIN_CHANGED: 'group_admin_changed', From f8cfc7889c99b7e0d804786ddd68899334b957f6 Mon Sep 17 00:00:00 2001 From: Gabryel Rigol Date: Sun, 9 Apr 2023 09:22:56 -0400 Subject: [PATCH 053/139] Fix isStatus (#2108) * Fix isStatus * Fiz isStatus --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 87d716311d..97aa3e3cff 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -109,7 +109,7 @@ class Message extends Base { * Indicates if the message is a status update * @type {boolean} */ - this.isStatus = data.isStatusV3; + this.isStatus = data.isStatusV3 || data.id.remote === 'status@broadcast'; /** * Indicates if the message was starred From 37724f6959ae3058acc738d2a8fce2e2fe2d5a09 Mon Sep 17 00:00:00 2001 From: tofers Date: Wed, 19 Apr 2023 02:50:08 +0300 Subject: [PATCH 054/139] fix: msg.chat (#2139) * fix function openChatWindowAt * fix star \ unstar * fix function delete * fix closeRightDrawer --- src/structures/Message.js | 21 ++++++++++++--------- src/util/Injected.js | 2 ++ src/util/InterfaceController.js | 6 ++++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 97aa3e3cff..d16e5ca1f1 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -443,15 +443,16 @@ class Message extends Base { * @param {?boolean} everyone If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat. */ async delete(everyone) { - await this.client.pupPage.evaluate((msgId, everyone) => { + await this.client.pupPage.evaluate(async (msgId, everyone) => { let msg = window.Store.Msg.get(msgId); - + let chat = await window.Store.Chat.find(msg.id.remote); + const canRevoke = window.Store.MsgActionChecks.canSenderRevokeMsg(msg) || window.Store.MsgActionChecks.canAdminRevokeMsg(msg); if (everyone && canRevoke) { - return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], { type: msg.id.fromMe ? 'Sender' : 'Admin' }); + return window.Store.Cmd.sendRevokeMsgs(chat, [msg], { clearMedia: true, type: msg.id.fromMe ? 'Sender' : 'Admin' }); } - return window.Store.Cmd.sendDeleteMsgs(msg.chat, [msg], true); + return window.Store.Cmd.sendDeleteMsgs(chat, [msg], true); }, this.id._serialized, everyone); } @@ -459,11 +460,12 @@ class Message extends Base { * Stars this message */ async star() { - await this.client.pupPage.evaluate((msgId) => { + await this.client.pupPage.evaluate(async (msgId) => { let msg = window.Store.Msg.get(msgId); - + if (window.Store.MsgActionChecks.canStarMsg(msg)) { - return window.Store.Cmd.sendStarMsgs(msg.chat, [msg], false); + let chat = await window.Store.Chat.find(msg.id.remote); + return window.Store.Cmd.sendStarMsgs(chat, [msg], false); } }, this.id._serialized); } @@ -472,11 +474,12 @@ class Message extends Base { * Unstars this message */ async unstar() { - await this.client.pupPage.evaluate((msgId) => { + await this.client.pupPage.evaluate(async (msgId) => { let msg = window.Store.Msg.get(msgId); if (window.Store.MsgActionChecks.canStarMsg(msg)) { - return window.Store.Cmd.sendUnstarMsgs(msg.chat, [msg], false); + let chat = await window.Store.Chat.find(msg.id.remote); + return window.Store.Cmd.sendUnstarMsgs(chat, [msg], false); } }, this.id._serialized); } diff --git a/src/util/Injected.js b/src/util/Injected.js index cf812a9f98..cec31434a5 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -54,6 +54,8 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.QuotedMsg = window.mR.findModule('getQuotedMsgObj')[0]; window.Store.Socket = window.mR.findModule('deprecatedSendIq')[0]; window.Store.SocketWap = window.mR.findModule('wap')[0]; + window.Store.SearchContext = window.mR.findModule('getSearchContext')[0].getSearchContext; + window.Store.DrawerManager = window.mR.findModule('DrawerManager')[0].DrawerManager; window.Store.StickerTools = { ...window.mR.findModule('toWebpSticker')[0], ...window.mR.findModule('addWebpMetadata')[0] diff --git a/src/util/InterfaceController.js b/src/util/InterfaceController.js index a87959da63..2c7e1cab0a 100644 --- a/src/util/InterfaceController.js +++ b/src/util/InterfaceController.js @@ -50,7 +50,9 @@ class InterfaceController { async openChatWindowAt(msgId) { await this.pupPage.evaluate(async msgId => { let msg = await window.Store.Msg.get(msgId); - await window.Store.Cmd.openChatAt(msg.chat, msg.chat.getSearchContext(msg)); + let chat = await window.Store.Chat.find(msg.id.remote); + let searchContext = await window.Store.SearchContext(chat,msg); + await window.Store.Cmd.openChatAt(chat, searchContext); }, msgId); } @@ -70,7 +72,7 @@ class InterfaceController { */ async closeRightDrawer() { await this.pupPage.evaluate(async () => { - await window.Store.Cmd.closeDrawerRight(); + await window.Store.DrawerManager.closeDrawerRight(); }); } From d8fd4579143624384004c1f966bb1d92f0a69036 Mon Sep 17 00:00:00 2001 From: Pierluca Lino Date: Thu, 20 Apr 2023 17:19:57 +0200 Subject: [PATCH 055/139] feat: Optional proxy autentication (#2143) --- example.js | 6 +++++- index.d.ts | 4 +++- src/Client.js | 5 +++++ src/util/Constants.js | 3 ++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/example.js b/example.js index f00b1303b6..065fd123ec 100644 --- a/example.js +++ b/example.js @@ -2,7 +2,11 @@ const { Client, Location, List, Buttons, LocalAuth } = require('./index'); const client = new Client({ authStrategy: new LocalAuth(), - puppeteer: { headless: false } + // proxyAuthentication: { username: 'username', password: 'password' }, + puppeteer: { + // args: ['--proxy-server=proxy-server-that-requires-authentication.example.com'], + headless: false + } }); client.initialize(); diff --git a/index.d.ts b/index.d.ts index 23ba35cd45..38d2ebbd50 100644 --- a/index.d.ts +++ b/index.d.ts @@ -387,7 +387,9 @@ declare namespace WAWebJS { userAgent?: string /** Ffmpeg path to use when formating videos to webp while sending stickers * @default 'ffmpeg' */ - ffmpegPath?: string + ffmpegPath?: string, + /** Object with proxy autentication requirements @default: undefined */ + proxyAuthentication?: {username: string, password: string} | undefined } /** diff --git a/src/Client.js b/src/Client.js index d0c949c5d2..fef8e4c456 100644 --- a/src/Client.js +++ b/src/Client.js @@ -29,6 +29,7 @@ const NoAuth = require('./authStrategies/NoAuth'); * @param {string} options.userAgent - User agent to use in puppeteer * @param {string} options.ffmpegPath - Ffmpeg path to use when formating videos to webp while sending stickers * @param {boolean} options.bypassCSP - Sets bypassing of page's Content-Security-Policy. + * @param {object} options.proxyAuthentication - Proxy Authentication object. * * @fires Client#qr * @fires Client#authenticated @@ -102,6 +103,10 @@ class Client extends EventEmitter { browser = await puppeteer.launch({...puppeteerOpts, args: browserArgs}); page = (await browser.pages())[0]; } + + if (this.options.proxyAuthentication !== undefined) { + await page.authenticate(this.options.proxyAuthentication); + } await page.setUserAgent(this.options.userAgent); if (this.options.bypassCSP) await page.setBypassCSP(true); diff --git a/src/util/Constants.js b/src/util/Constants.js index 97512c1b4d..aa1005d155 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -13,7 +13,8 @@ exports.DefaultOptions = { takeoverTimeoutMs: 0, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', ffmpegPath: 'ffmpeg', - bypassCSP: false + bypassCSP: false, + proxyAuthentication: undefined }; /** From 081b455fa513758fb06de577973179ee1c82a04a Mon Sep 17 00:00:00 2001 From: tofers Date: Fri, 19 May 2023 19:25:54 +0300 Subject: [PATCH 056/139] hotfix: newId and deviceType (#2196) * update method generate Msg id, newId to newIdV2 * replace newId and await in version WA 2.2321.6 * fix deviceType --- src/structures/Message.js | 3 +-- src/util/Injected.js | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index d16e5ca1f1..a3b311796e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -89,8 +89,7 @@ class Message extends Base { * String that represents from which device type the message was sent * @type {string} */ - this.deviceType = data.id.id.length > 21 ? 'android' : data.id.id.substring(0, 2) == '3A' ? 'ios' : 'web'; - + this.deviceType = typeof data.id.id === 'string' && data.id.id.length > 21 ? 'android' : typeof data.id.id === 'string' && data.id.id.substring(0, 2) === '3A' ? 'ios' : 'web'; /** * Indicates if the message was forwarded * @type {boolean} diff --git a/src/util/Injected.js b/src/util/Injected.js index cec31434a5..76d134abe0 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -245,11 +245,12 @@ exports.LoadUtils = () => { const meUser = window.Store.User.getMaybeMeUser(); const isMD = window.Store.MDBackend; - + const newId = await window.Store.MsgKey.newId(); + const newMsgId = new window.Store.MsgKey({ from: meUser, to: chat.id, - id: window.Store.MsgKey.newId(), + id: newId, participant: isMD && chat.id.isGroup() ? meUser : undefined, selfDir: 'out', }); From 2b8eb518ede9f3a5aa165d16e404b63546d25d16 Mon Sep 17 00:00:00 2001 From: WWebJS Bot Date: Fri, 19 May 2023 22:17:56 +0000 Subject: [PATCH 057/139] 1.20.0-alpha.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 012bff6717..f272b46e3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.19.5", + "version": "1.20.0-alpha.0", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 915763a8d04c37c2ddcb93faa512cfe208f1798e Mon Sep 17 00:00:00 2001 From: Pedro S Lopez Date: Fri, 19 May 2023 23:58:10 -0400 Subject: [PATCH 058/139] chore: mark version v1.20.0 --- docs/Base.html | 8 +- docs/BaseAuthStrategy.html | 8 +- docs/BusinessContact.html | 8 +- docs/Buttons.html | 8 +- docs/Call.html | 8 +- docs/Chat.html | 22 +- docs/Client.html | 303 +- docs/Client.js.html | 113 +- docs/ClientInfo.html | 8 +- docs/Contact.html | 8 +- docs/GroupChat.html | 92 +- docs/GroupNotification.html | 8 +- docs/InterfaceController.html | 8 +- docs/Label.html | 8 +- docs/LegacySessionAuth.html | 8 +- docs/List.html | 8 +- docs/LocalAuth.html | 8 +- docs/Location.html | 8 +- docs/Message.html | 38 +- docs/MessageMedia.html | 8 +- docs/NoAuth.html | 8 +- docs/Order.html | 8 +- docs/PrivateChat.html | 24 +- docs/PrivateContact.html | 8 +- docs/Product.html | 8 +- docs/Reaction.html | 8 +- docs/RemoteAuth.html | 8 +- docs/Util.html | 8 +- docs/authStrategies_BaseAuthStrategy.js.html | 8 +- docs/authStrategies_LegacySessionAuth.js.html | 8 +- docs/authStrategies_LocalAuth.js.html | 8 +- docs/authStrategies_NoAuth.js.html | 8 +- docs/authStrategies_RemoteAuth.js.html | 8 +- docs/global.html | 152 +- docs/index.html | 6525 +++++++++-------- docs/structures_Base.js.html | 8 +- docs/structures_BusinessContact.js.html | 8 +- docs/structures_Buttons.js.html | 8 +- docs/structures_Call.js.html | 8 +- docs/structures_Chat.js.html | 14 +- docs/structures_ClientInfo.js.html | 8 +- docs/structures_Contact.js.html | 8 +- docs/structures_GroupChat.js.html | 33 +- docs/structures_GroupNotification.js.html | 8 +- docs/structures_Label.js.html | 8 +- docs/structures_List.js.html | 8 +- docs/structures_Location.js.html | 8 +- docs/structures_Message.js.html | 81 +- docs/structures_MessageMedia.js.html | 8 +- docs/structures_Order.js.html | 8 +- docs/structures_Payment.js.html | 8 +- docs/structures_PrivateChat.js.html | 8 +- docs/structures_PrivateContact.js.html | 8 +- docs/structures_Product.js.html | 8 +- docs/structures_ProductMetadata.js.html | 8 +- docs/structures_Reaction.js.html | 8 +- docs/util_Constants.js.html | 16 +- docs/util_InterfaceController.js.html | 14 +- docs/util_Util.js.html | 8 +- package.json | 2 +- 60 files changed, 4356 insertions(+), 3441 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 8b72b80521..c8c8fdbfc6 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Base + whatsapp-web.js 1.20.0 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index 45b4f5d15d..ad240e7078 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: BaseAuthStrategy + whatsapp-web.js 1.20.0 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 8ca34628a7..9bb1f76989 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: BusinessContact + whatsapp-web.js 1.20.0 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index db66dc31f4..646c69c48b 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Buttons + whatsapp-web.js 1.20.0 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 2ed0b0d76a..9f6d2877c6 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Call + whatsapp-web.js 1.20.0 » Class: Call @@ -15,7 +15,7 @@ @@ -168,7 +168,7 @@

reject<
diff --git a/docs/Chat.html b/docs/Chat.html index 48ef3299c2..f8d8d21af1 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Chat + whatsapp-web.js 1.20.0 » Class: Chat @@ -15,7 +15,7 @@ @@ -58,19 +58,22 @@

Properties

isReadOnly
-
muteExpiration
+
lastMessage
-
name
+
muteExpiration
-
pinned
+
name

+
pinned
+
+
timestamp
@@ -185,6 +188,11 @@

isReadOnly

+

lastMessage +  Message

+

Last message fo chat

+
+

muteExpiration  number

Unix timestamp for when the mute expires

@@ -497,7 +505,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index 01ef7bb4a6..fcbbad8d30 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Client + whatsapp-web.js 1.20.0 » Class: Client @@ -15,7 +15,7 @@ @@ -26,7 +26,7 @@

+
group_admin_changed
+
+
+
group_join
+
+
group_leave
@@ -447,6 +465,20 @@

Parameters

Sets bypassing of page's Content-Security-Policy.

+ + +

proxyAuthentication

+ + +

 

+ + +

 

+ + +

Proxy Authentication object.

+ + @@ -473,6 +505,8 @@

Parameters

Client#event:group_update
Client#event:disconnected
Client#event:change_state
+
Client#event:contact_changed
+
Client#event:group_admin_changed
@@ -638,6 +672,17 @@

Parameters

async
+

deleteProfilePicture() → Promise containing boolean

+

Deletes the current user's profile picture.

+
+
Returns
+
+

Promise containing boolean  +

Returns true if the picture was properly deleted.

+

+
+
+
async

destroy()

Closes the client

@@ -1515,6 +1560,45 @@

Parameter

async
+

setProfilePicture(media) → Promise containing boolean

+

Sets the current user's profile picture.

+
+

Parameter

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

media

+
+

MessageMedia

+
+

 

+
+
+
+
+
Returns
+
+

Promise containing boolean  +

Returns true if the picture was properly updated.

+

+
+
+
async

setStatus(status)

Sets the current user's status message

@@ -1749,6 +1833,172 @@

Parameter

+

chat_archived

+

Emitted when a chat is archived/unarchived

+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

chat

+
+

Chat

+
+

 

+
+
+

currState

+
+

boolean

+
+

 

+
+
+

prevState

+
+

boolean

+
+

 

+
+
+
+
+
+

chat_removed

+

Emitted when a chat is removed

+
+

Parameter

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

chat

+
+

Chat

+
+

 

+
+
+
+
+
+

contact_changed

+

Emitted when a contact or a group participant changes their phone number.

+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

message

+
+

Message

+
+

 

+
+

Message with more information about the event.

+
+

oldId

+
+

String

+
+

 

+
+

The user's id (an old one) who changed their phone number + and who triggered the notification.

+
+

newId

+
+

String

+
+

 

+
+

The user's new id after the change.

+
+

isContact

+
+

Boolean

+
+

 

+
+

Indicates if a contact or a group participant changed their phone number.

+
+
+
+

disconnected

Emitted when the client has been disconnected

@@ -1782,6 +2032,39 @@

Parameter

+

group_admin_changed

+

Emitted when a current user is promoted to an admin or demoted to a regular user.

+
+

Parameter

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

notification

+
+

GroupNotification

+
+

 

+
+

GroupNotification with more information about the action

+
+
+
+

group_join

Emitted when a user joins the chat via invite link or is added by an admin.

@@ -2486,7 +2769,7 @@

ready

diff --git a/docs/Client.js.html b/docs/Client.js.html index 6a180d7c51..80f345bd89 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: Client.js + whatsapp-web.js 1.20.0 » Source: Client.js @@ -15,7 +15,7 @@ @@ -41,7 +41,7 @@

Source: Client.js

const { ExposeStore, LoadUtils } = require('./util/Injected'); const ChatFactory = require('./factories/ChatFactory'); const ContactFactory = require('./factories/ContactFactory'); -const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List, Reaction } = require('./structures'); +const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List, Reaction, Chat } = require('./structures'); const LegacySessionAuth = require('./authStrategies/LegacySessionAuth'); const NoAuth = require('./authStrategies/NoAuth'); @@ -60,6 +60,7 @@

Source: Client.js

* @param {string} options.userAgent - User agent to use in puppeteer * @param {string} options.ffmpegPath - Ffmpeg path to use when formating videos to webp while sending stickers * @param {boolean} options.bypassCSP - Sets bypassing of page's Content-Security-Policy. + * @param {object} options.proxyAuthentication - Proxy Authentication object. * * @fires Client#qr * @fires Client#authenticated @@ -76,6 +77,8 @@

Source: Client.js

* @fires Client#group_update * @fires Client#disconnected * @fires Client#change_state + * @fires Client#contact_changed + * @fires Client#group_admin_changed */ class Client extends EventEmitter { constructor(options = {}) { @@ -131,6 +134,10 @@

Source: Client.js

browser = await puppeteer.launch({...puppeteerOpts, args: browserArgs}); page = (await browser.pages())[0]; } + + if (this.options.proxyAuthentication !== undefined) { + await page.authenticate(this.options.proxyAuthentication); + } await page.setUserAgent(this.options.userAgent); if (this.options.bypassCSP) await page.setBypassCSP(true); @@ -348,6 +355,13 @@

Source: Client.js

* @param {GroupNotification} notification GroupNotification with more information about the action */ this.emit(Events.GROUP_LEAVE, notification); + } else if (msg.subtype === 'promote' || msg.subtype === 'demote') { + /** + * Emitted when a current user is promoted to an admin or demoted to a regular user. + * @event Client#group_admin_changed + * @param {GroupNotification} notification GroupNotification with more information about the action + */ + this.emit(Events.GROUP_ADMIN_CHANGED, notification); } else { /** * Emitted when group settings are updated, such as subject, description or picture. @@ -407,6 +421,36 @@

Source: Client.js

last_message = msg; } + /** + * The event notification that is received when one of + * the group participants changes thier phone number. + */ + const isParticipant = msg.type === 'gp2' &amp;&amp; msg.subtype === 'modify'; + + /** + * The event notification that is received when one of + * the contacts changes thier phone number. + */ + const isContact = msg.type === 'notification_template' &amp;&amp; msg.subtype === 'change_number'; + + if (isParticipant || isContact) { + /** {@link GroupNotification} object does not provide enough information about this event, so a {@link Message} object is used. */ + const message = new Message(this, msg); + + const newId = isParticipant ? msg.recipients[0] : msg.to; + const oldId = isParticipant ? msg.author : msg.templateParams.find(id => id !== newId); + + /** + * Emitted when a contact or a group participant changes their phone number. + * @event Client#contact_changed + * @param {Message} message Message with more information about the event. + * @param {String} oldId The user's id (an old one) who changed their phone number + * and who triggered the notification. + * @param {String} newId The user's new id after the change. + * @param {Boolean} isContact Indicates if a contact or a group participant changed their phone number. + */ + this.emit(Events.CONTACT_CHANGED, message, oldId, newId, isContact); + } }); await page.exposeFunction('onRemoveMessageEvent', (msg) => { @@ -438,6 +482,15 @@

Source: Client.js

}); + await page.exposeFunction('onChatUnreadCountEvent', async (data) =>{ + const chat = await this.getChatById(data.id); + + /** + * Emitted when the chat unread count changes + */ + this.emit(Events.UNREAD_COUNT, chat); + }); + await page.exposeFunction('onMessageMediaUploadedEvent', (msg) => { const message = new Message(this, msg); @@ -538,6 +591,26 @@

Source: Client.js

} }); + await page.exposeFunction('onRemoveChatEvent', (chat) => { + /** + * Emitted when a chat is removed + * @event Client#chat_removed + * @param {Chat} chat + */ + this.emit(Events.CHAT_REMOVED, new Chat(this, chat)); + }); + + await page.exposeFunction('onArchiveChatEvent', (chat, currState, prevState) => { + /** + * Emitted when a chat is archived/unarchived + * @event Client#chat_archived + * @param {Chat} chat + * @param {boolean} currState + * @param {boolean} prevState + */ + this.emit(Events.CHAT_ARCHIVED, new Chat(this, chat), currState, prevState); + }); + await page.evaluate(() => { 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)); }); @@ -547,6 +620,8 @@

Source: Client.js

window.Store.AppState.on('change:state', (_AppState, state) => { window.onAppStateChangedEvent(state); }); window.Store.Conn.on('change:battery', (state) => { window.onBatteryStateChangedEvent(state); }); window.Store.Call.on('add', (call) => { window.onIncomingCall(call); }); + window.Store.Chat.on('remove', async (chat) => { window.onRemoveChatEvent(await window.WWebJS.getChatModel(chat)); }); + window.Store.Chat.on('change:archive', async (chat, currState, prevState) => { window.onArchiveChatEvent(await window.WWebJS.getChatModel(chat), currState, prevState); }); window.Store.Msg.on('add', (msg) => { if (msg.isNewMsg) { if(msg.type === 'ciphertext') { @@ -557,7 +632,8 @@

Source: Client.js

} } }); - + window.Store.Chat.on('change:unreadCount', (chat) => {window.onChatUnreadCountEvent(chat);}); + { const module = window.Store.createOrUpdateReactionsModule; const ogMethod = module.createOrUpdateReactions; @@ -1209,6 +1285,31 @@

Source: Client.js

return blockedContacts.map(contact => ContactFactory.create(this.client, contact)); } + + /** + * Sets the current user's profile picture. + * @param {MessageMedia} media + * @returns {Promise&lt;boolean>} Returns true if the picture was properly updated. + */ + async setProfilePicture(media) { + const success = await this.pupPage.evaluate((chatid, media) => { + return window.WWebJS.setPicture(chatid, media); + }, this.info.wid._serialized, media); + + return success; + } + + /** + * Deletes the current user's profile picture. + * @returns {Promise&lt;boolean>} Returns true if the picture was properly deleted. + */ + async deleteProfilePicture() { + const success = await this.pupPage.evaluate((chatid) => { + return window.WWebJS.deletePicture(chatid); + }, this.info.wid._serialized); + + return success; + } } module.exports = Client; @@ -1222,7 +1323,7 @@

Source: Client.js

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 02211359be..9e3ec10a70 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: ClientInfo + whatsapp-web.js 1.20.0 » Class: ClientInfo @@ -15,7 +15,7 @@ @@ -242,7 +242,7 @@

getBatteryStatus diff --git a/docs/Contact.html b/docs/Contact.html index 29a9d00552..e6fd4f8c89 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Contact + whatsapp-web.js 1.20.0 » Class: Contact @@ -15,7 +15,7 @@ @@ -293,7 +293,7 @@

unblock diff --git a/docs/GroupChat.html b/docs/GroupChat.html index a27f22dedc..3065d2ec7f 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: GroupChat + whatsapp-web.js 1.20.0 » Class: GroupChat @@ -15,7 +15,7 @@ @@ -64,19 +64,22 @@

Properties

isReadOnly
-
muteExpiration
+
lastMessage
-
name
+
muteExpiration
-
owner
+
name

+
owner
+
+
participants
@@ -113,6 +116,9 @@

Methods

delete()
+
deletePicture()
+
+
demoteParticipants(participantIds)
@@ -125,13 +131,13 @@

Methods

getInviteCode()
-
getLabels()
-
-
+
getLabels()
+
+
leave()
@@ -159,13 +165,13 @@

Methods

sendSeen()
-
sendStateRecording()
-
-
+
sendStateRecording()
+
+
sendStateTyping()
@@ -178,6 +184,9 @@

Methods

setMessagesAdminsOnly([adminsOnly])
+
setPicture(media)
+
+
setSubject(subject)
@@ -250,6 +259,13 @@

isReadOnlyChat#isReadOnly

+

lastMessage +  unknown

+

Last message fo chat

+
+
Inherited from
+
Chat#lastMessage
+

muteExpiration  unknown

Unix timestamp for when the mute expires

@@ -372,6 +388,17 @@

delete<
async
+

deletePicture() → Promise containing boolean

+

Deletes the group's picture.

+
+
Returns
+
+

Promise containing boolean  +

Returns true if the picture was properly deleted. This can return false if the user does not have the necessary permissions.

+

+
+
+
async

demoteParticipants(participantIds) → Promise containing {status: number}

Demotes participants by IDs to regular users

@@ -868,6 +895,45 @@

Parameter

async
+

setPicture(media) → Promise containing boolean

+

Sets the group's picture.

+
+

Parameter

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

media

+
+

MessageMedia

+
+

 

+
+
+
+
+
Returns
+
+

Promise containing boolean  +

Returns true if the picture was properly updated. This can return false if the user does not have the necessary permissions.

+

+
+
+
async

setSubject(subject) → Promise containing boolean

Updates the group subject

@@ -941,7 +1007,7 @@

unpin diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html index 739b7a2e7c..b26ef118c2 100644 --- a/docs/GroupNotification.html +++ b/docs/GroupNotification.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: GroupNotification + whatsapp-web.js 1.20.0 » Class: GroupNotification @@ -15,7 +15,7 @@ @@ -233,7 +233,7 @@

Parameters

diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html index 862364ce49..9826824cf9 100644 --- a/docs/InterfaceController.html +++ b/docs/InterfaceController.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: InterfaceController + whatsapp-web.js 1.20.0 » Class: InterfaceController @@ -15,7 +15,7 @@ @@ -382,7 +382,7 @@

Parameter

diff --git a/docs/Label.html b/docs/Label.html index da6fac5546..ddbe7fc2d3 100644 --- a/docs/Label.html +++ b/docs/Label.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Label + whatsapp-web.js 1.20.0 » Class: Label @@ -15,7 +15,7 @@ @@ -163,7 +163,7 @@

getChats diff --git a/docs/LegacySessionAuth.html b/docs/LegacySessionAuth.html index b248e58d57..6fdde0bc07 100644 --- a/docs/LegacySessionAuth.html +++ b/docs/LegacySessionAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: LegacySessionAuth + whatsapp-web.js 1.20.0 » Class: LegacySessionAuth @@ -15,7 +15,7 @@ @@ -173,7 +173,7 @@

Parameters

diff --git a/docs/List.html b/docs/List.html index f2c4affe3d..d1190a5190 100644 --- a/docs/List.html +++ b/docs/List.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: List + whatsapp-web.js 1.20.0 » Class: List @@ -15,7 +15,7 @@ @@ -256,7 +256,7 @@

Parameter

diff --git a/docs/LocalAuth.html b/docs/LocalAuth.html index 1a4f18a4b1..e722be24c3 100644 --- a/docs/LocalAuth.html +++ b/docs/LocalAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: LocalAuth + whatsapp-web.js 1.20.0 » Class: LocalAuth @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Parameters

diff --git a/docs/Location.html b/docs/Location.html index 0c80012040..012a74af7b 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Location + whatsapp-web.js 1.20.0 » Class: Location @@ -15,7 +15,7 @@ @@ -149,7 +149,7 @@

longitude diff --git a/docs/Message.html b/docs/Message.html index d528a725d3..6d47a76a35 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Message + whatsapp-web.js 1.20.0 » Class: Message @@ -15,7 +15,7 @@ @@ -26,7 +26,7 @@

+
location
+
+
mediaKey
@@ -180,13 +183,16 @@

Methods

getQuotedMessage()
-
react(reaction)
+
getReactions()
+
react(reaction)
+
+
reload()
@@ -270,6 +276,11 @@

hasQuotedMsgIndicates if the message was sent as a reply to another message.

+

hasReaction +  boolean

+

Indicates whether there are reactions to the message

+
+

id  object

ID that represents the message

@@ -518,6 +529,15 @@

getQuotedMessage

async
+

getReactions() → Promise containing Array of ReactionList

+

Gets the reactions associated with the given message

+
+
Returns
+
+

Promise containing Array of ReactionList 

+
+
+
async

react(reaction) → Promise

React to this message with an emoji

@@ -650,7 +670,7 @@

unstar<
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index 17046c4077..5d617b8a49 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: MessageMedia + whatsapp-web.js 1.20.0 » Class: MessageMedia @@ -15,7 +15,7 @@ @@ -364,7 +364,7 @@

Parameters

diff --git a/docs/NoAuth.html b/docs/NoAuth.html index 1ee676e048..d112cbc823 100644 --- a/docs/NoAuth.html +++ b/docs/NoAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: NoAuth + whatsapp-web.js 1.20.0 » Class: NoAuth @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

new NoAuth diff --git a/docs/Order.html b/docs/Order.html index a116147fe3..f63b6d4469 100644 --- a/docs/Order.html +++ b/docs/Order.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Order + whatsapp-web.js 1.20.0 » Class: Order @@ -15,7 +15,7 @@ @@ -102,7 +102,7 @@

total diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index d903c67246..19e1e479d0 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: PrivateChat + whatsapp-web.js 1.20.0 » Class: PrivateChat @@ -15,7 +15,7 @@ @@ -58,19 +58,22 @@

Properties

isReadOnly
-
muteExpiration
+
lastMessage
-
name
+
muteExpiration
-
pinned
+
name

+
pinned
+
+
timestamp
@@ -195,6 +198,13 @@

isReadOnlyChat#isReadOnly

+

lastMessage +  unknown

+

Last message fo chat

+
+
Inherited from
+
Chat#lastMessage
+

muteExpiration  unknown

Unix timestamp for when the mute expires

@@ -533,7 +543,7 @@

unpin diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index b41f3e9cb2..20d0e9e089 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: PrivateContact + whatsapp-web.js 1.20.0 » Class: PrivateContact @@ -15,7 +15,7 @@ @@ -319,7 +319,7 @@

unblock diff --git a/docs/Product.html b/docs/Product.html index 549ce626f0..9212e025cc 100644 --- a/docs/Product.html +++ b/docs/Product.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Product + whatsapp-web.js 1.20.0 » Class: Product @@ -15,7 +15,7 @@ @@ -127,7 +127,7 @@

thumbnailUrl diff --git a/docs/Reaction.html b/docs/Reaction.html index ade180ce7e..b56459f3f6 100644 --- a/docs/Reaction.html +++ b/docs/Reaction.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Reaction + whatsapp-web.js 1.20.0 » Class: Reaction @@ -15,7 +15,7 @@ @@ -144,7 +144,7 @@

timestamp diff --git a/docs/RemoteAuth.html b/docs/RemoteAuth.html index 077388e30b..4003fc49ad 100644 --- a/docs/RemoteAuth.html +++ b/docs/RemoteAuth.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: RemoteAuth + whatsapp-web.js 1.20.0 » Class: RemoteAuth @@ -15,7 +15,7 @@ @@ -148,7 +148,7 @@

Parameters

diff --git a/docs/Util.html b/docs/Util.html index ca629bade4..3c6ea6b07a 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Class: Util + whatsapp-web.js 1.20.0 » Class: Util @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Parameter

diff --git a/docs/authStrategies_BaseAuthStrategy.js.html b/docs/authStrategies_BaseAuthStrategy.js.html index 2d02c68cc4..d8b4b2d842 100644 --- a/docs/authStrategies_BaseAuthStrategy.js.html +++ b/docs/authStrategies_BaseAuthStrategy.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: authStrategies/BaseAuthStrategy.js + whatsapp-web.js 1.20.0 » Source: authStrategies/BaseAuthStrategy.js @@ -15,7 +15,7 @@ @@ -65,7 +65,7 @@

Source: authStrategies/BaseAuthStrategy.js

diff --git a/docs/authStrategies_LegacySessionAuth.js.html b/docs/authStrategies_LegacySessionAuth.js.html index 3c9e0d3e95..44642fd748 100644 --- a/docs/authStrategies_LegacySessionAuth.js.html +++ b/docs/authStrategies_LegacySessionAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: authStrategies/LegacySessionAuth.js + whatsapp-web.js 1.20.0 » Source: authStrategies/LegacySessionAuth.js @@ -15,7 +15,7 @@ @@ -111,7 +111,7 @@

Source: authStrategies/LegacySessionAuth.js

diff --git a/docs/authStrategies_LocalAuth.js.html b/docs/authStrategies_LocalAuth.js.html index 9b370062d2..58688aba18 100644 --- a/docs/authStrategies_LocalAuth.js.html +++ b/docs/authStrategies_LocalAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: authStrategies/LocalAuth.js + whatsapp-web.js 1.20.0 » Source: authStrategies/LocalAuth.js @@ -15,7 +15,7 @@ @@ -91,7 +91,7 @@

Source: authStrategies/LocalAuth.js

diff --git a/docs/authStrategies_NoAuth.js.html b/docs/authStrategies_NoAuth.js.html index 6321c1d00f..97d65519f5 100644 --- a/docs/authStrategies_NoAuth.js.html +++ b/docs/authStrategies_NoAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: authStrategies/NoAuth.js + whatsapp-web.js 1.20.0 » Source: authStrategies/NoAuth.js @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

Source: authStrategies/NoAuth.js

diff --git a/docs/authStrategies_RemoteAuth.js.html b/docs/authStrategies_RemoteAuth.js.html index b4a777fc2e..c42fea6d51 100644 --- a/docs/authStrategies_RemoteAuth.js.html +++ b/docs/authStrategies_RemoteAuth.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: authStrategies/RemoteAuth.js + whatsapp-web.js 1.20.0 » Source: authStrategies/RemoteAuth.js @@ -15,7 +15,7 @@ @@ -243,7 +243,7 @@

Source: authStrategies/RemoteAuth.js

diff --git a/docs/global.html b/docs/global.html index 50c2cb31a2..206a6ffdb0 100644 --- a/docs/global.html +++ b/docs/global.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Globals + whatsapp-web.js 1.20.0 » Globals @@ -15,7 +15,7 @@ @@ -94,6 +94,9 @@

Abstract types

+
ReactionList
+
+
StickerMetadata
@@ -220,6 +223,32 @@

Properties

+ + +

CHAT_REMOVED

+ + +

 

+ + +

 

+ + + + + + +

CHAT_ARCHIVED

+ + +

 

+ + +

 

+ + + +

MESSAGE_RECEIVED

@@ -285,6 +314,19 @@

Properties

+ + +

UNREAD_COUNT

+ + +

 

+ + +

 

+ + + +

MESSAGE_REACTION

@@ -311,6 +353,19 @@

Properties

+ + +

CONTACT_CHANGED

+ + +

 

+ + +

 

+ + + +

GROUP_JOIN

@@ -337,6 +392,19 @@

Properties

+ + +

GROUP_ADMIN_CHANGED

+ + +

 

+ + +

 

+ + + +

GROUP_UPDATE

@@ -1950,6 +2018,82 @@

Properties

+

ReactionList +  Object

+

Reaction List

+
+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

id

+
+

string

+
+

 

+
+

Original emoji

+
+

aggregateEmoji

+
+

string

+
+

 

+
+

aggregate emoji

+
+

hasReactionByMe

+
+

boolean

+
+

 

+
+

Flag who sent the reaction

+
+

senders

+
+

Array of Reaction

+
+

 

+
+

Reaction senders, to this message

+
+
+
+

StickerMetadata  Object

Sticker metadata.

@@ -2019,7 +2163,7 @@

Properties

diff --git a/docs/index.html b/docs/index.html index 17e9fb8402..8fa8a46861 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,53 +1,52 @@ - - - - - whatsapp-web.js 1.19.5 » Home - - - - - - - - + +
+
+
+ +
+ + +

npm Depfu WhatsApp_Web 2.2306.7 Discord Chat

+

whatsapp-web.js

+

A WhatsApp API client that connects through the WhatsApp Web browser app

+

It uses Puppeteer to run a real instance of Whatsapp Web to avoid getting blocked.

+

NOTE: I can't guarantee you will not be blocked by using this method, although it has worked for me. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.

+

Quick Links

+ +

Installation

+

The module is now available on npm! npm i whatsapp-web.js

+

Please note that Node v12+ is required.

+

Example usage

+
const { Client } = require('whatsapp-web.js');
 
 const client = new Client();
 
@@ -68,3229 +67,3427 @@ 

Example usage

client.initialize();
-

Take a look at example.js for another example with more use cases.

-

For more information on saving and restoring sessions, check out the available Authentication Strategies.

-

Supported features

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureStatus
Multi Device
Send messages
Receive messages
Send media (images/audio/documents)
Send media (video)(requires google chrome)
Send stickers
Receive media (images/audio/video/documents)
Send contact cards
Send location
Send buttons
Send lists✅ (business accounts not supported)
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
React to messages
-

Something missing? Make an issue and let us know!

-

Contributing

-

Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.

-

Supporting the project

-

You can support the maintainer of this project through the links below

- -

Disclaimer

-

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.

-

License

-

Copyright 2019 Pedro S Lopez

-

Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this project except in compliance with the License. - You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

-

Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License.

-
-
-
-
+

Take a look at example.js for another example with more use cases.

+

For more information on saving and restoring sessions, check out the available Authentication Strategies.

+

Supported features

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureStatus
Multi Device
Send messages
Receive messages
Send media (images/audio/documents)
Send media (video)(requires google chrome)
Send stickers
Receive media (images/audio/video/documents)
Send contact cards
Send location
Send buttons
Send lists✅ (business accounts not supported)
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
React to messages
+

Something missing? Make an issue and let us know!

+

Contributing

+

Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.

+

Supporting the project

+

You can support the maintainer of this project through the links below

+ +

Disclaimer

+

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates. The official WhatsApp website can be found at https://whatsapp.com. "WhatsApp" as well as related names, marks, emblems and images are registered trademarks of their respective owners.

+

License

+

Copyright 2019 Pedro S Lopez

+

Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this project except in compliance with the License. +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

+

Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.

+ +
+
+

Base

-
-
-
- Base() -
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Base() +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

BaseAuthStrategy

-
-
-
- BaseAuthStrategy() -
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ BaseAuthStrategy() +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

BusinessContact

- - - + + + + + +
-
-
-
-
+
+
+
+

Buttons

- -
-
-
- Buttons#body -
-
-
-
- Buttons#buttons -
-
-
-
-
-
-
-
- Buttons#footer -
-
-
-
- Buttons#title -
-
-
-
-
+ + +
+
+
+ Buttons#body +
+
+
+
+ Buttons#buttons +
+
+
+
+
+ +
+
+
+ Buttons#footer +
+
+
+
+ Buttons#title +
+
+
+
+
+
-
-
-
-
+
+
+
+

Call

-
-
-
- Call() -
-
-
-
- Call#canHandleLocally -
-
-
-
- Call#from -
-
-
-
- Call#fromMe -
-
-
-
-
-
-
-
- Call#id -
-
-
-
- Call#isGroup -
-
-
-
- Call#isVideo -
-
-
-
- Call#participants -
-
-
-
-
-
-
-
- Call#reject() -
-
-
-
- Call#timestamp -
-
-
-
- Call#webClientShouldHandle -
-
-
-
-
+
+
+
+ Call() +
+
+
+
+ Call#canHandleLocally +
+
+
+
+ Call#from +
+
+
+
+ Call#fromMe +
+
+
+
+
+ +
+
+
+ Call#id +
+
+
+
+ Call#isGroup +
+
+
+
+ Call#isVideo +
+
+
+
+ Call#participants +
+
+
+
+
+ +
+
+
+ Call#reject() +
+
+
+
+ Call#timestamp +
+
+
+
+ Call#webClientShouldHandle +
+
+
+
+
+
-
-
-
-
+
+
+
+

Chat

-
-
-
- Chat() -
-
-
-
- Chat#archive() -
-
-
-
- Chat#archived -
-
-
-
- Chat#clearMessages() -
-
-
-
- Chat#clearState() -
-
-
-
- Chat#delete() -
-
-
-
- Chat#fetchMessages(searchOptions) -
-
-
-
- Chat#getContact() -
-
-
-
- Chat#getLabels() -
-
-
-
- Chat#id -
-
-
-
-
-
-
-
- Chat#isGroup -
-
-
-
- Chat#isMuted -
-
-
-
- Chat#isReadOnly -
-
-
-
- Chat#markUnread() -
-
-
-
- Chat#mute(unmuteDate) -
-
-
-
- Chat#muteExpiration -
-
-
-
- Chat#name -
-
-
-
- Chat#pin() -
-
-
-
- Chat#pinned -
-
-
-
- Chat#sendMessage(content[, options]) -
-
-
-
-
-
-
-
- Chat#sendSeen() -
-
-
-
- Chat#sendStateRecording() -
-
-
-
- Chat#sendStateTyping() -
-
-
-
- Chat#timestamp -
-
-
-
- Chat#unarchive() -
-
-
-
- Chat#unmute() -
-
-
-
- Chat#unpin() -
-
-
-
- Chat#unreadCount -
-
-
-
-
+
+
+
+ Chat() +
+
+
+
+ Chat#archive() +
+
+
+
+ Chat#archived +
+
+
+
+ Chat#clearMessages() +
+
+
+
+ Chat#clearState() +
+
+
+
+ Chat#delete() +
+
+
+
+ Chat#fetchMessages(searchOptions) +
+
+
+
+ Chat#getContact() +
+
+
+
+ Chat#getLabels() +
+
+
+
+ Chat#id +
+
+
+
+
+ +
+
+
+ Chat#isGroup +
+
+
+
+ Chat#isMuted +
+
+
+
+ Chat#isReadOnly +
+
+
+
+ Chat#lastMessage +
+
+
+
+ Chat#markUnread() +
+
+
+
+ Chat#mute(unmuteDate) +
+
+
+
+ Chat#muteExpiration +
+
+
+
+ Chat#name +
+
+
+
+ Chat#pin() +
+
+
+
+ Chat#pinned +
+
+
+
+
+ + +
-
-
-
-
+
+
+
+

ChatTypes

-
-
-
- ChatTypes.GROUP -
-
-
-
-
-
-
-
- ChatTypes.SOLO -
-
-
-
-
-
-
-
- ChatTypes.UNKNOWN -
-
-
-
-
+
+
+
+ ChatTypes.GROUP +
+
+
+
+
+ +
+
+
+ ChatTypes.SOLO +
+
+
+
+
+ +
+
+
+ ChatTypes.UNKNOWN +
+
+
+
+
+
-
-
-
-
+
+
+
+

Client

- - - + + + + + +
-
-
-
-
+
+
+
+

ClientInfo

-
-
-
- ClientInfo() -
-
-
-
- ClientInfo#getBatteryStatus() -
-
-
-
- ClientInfo#me -
-
-
-
-
-
-
-
- ClientInfo#phone -
-
-
-
- ClientInfo#platform -
-
-
-
- ClientInfo#pushname -
-
-
-
-
-
-
-
- ClientInfo#wid -
-
-
-
-
+
+
+
+ ClientInfo() +
+
+
+
+ ClientInfo#getBatteryStatus() +
+
+
+
+ ClientInfo#me +
+
+
+
+
+ +
+
+
+ ClientInfo#phone +
+
+
+
+ ClientInfo#platform +
+
+
+
+ ClientInfo#pushname +
+
+
+
+
+ +
+
+
+ ClientInfo#wid +
+
+
+
+
+
-
-
-
-
+
+
+
+

Contact

- -
-
-
- Contact#id -
-
-
-
- Contact#isBlocked -
-
-
-
- Contact#isBusiness -
-
-
-
- Contact#isEnterprise -
-
-
-
- Contact#isGroup -
-
-
-
- Contact#isMe -
-
-
-
- Contact#isMyContact -
-
-
-
- Contact#isUser -
-
-
-
-
-
-
-
- Contact#isWAContact -
-
-
-
- Contact#name -
-
-
-
- Contact#number -
-
-
-
- Contact#pushname -
-
-
-
- Contact#shortName -
-
-
-
- Contact#unblock() -
-
-
-
-
+ + +
+
+
+ Contact#id +
+
+
+
+ Contact#isBlocked +
+
+
+
+ Contact#isBusiness +
+
+
+
+ Contact#isEnterprise +
+
+
+
+ Contact#isGroup +
+
+
+
+ Contact#isMe +
+
+
+
+ Contact#isMyContact +
+
+
+
+ Contact#isUser +
+
+
+
+
+ +
+
+
+ Contact#isWAContact +
+
+
+
+ Contact#name +
+
+
+
+ Contact#number +
+
+
+
+ Contact#pushname +
+
+
+
+ Contact#shortName +
+
+
+
+ Contact#unblock() +
+
+
+
+
+
-
-
-
-
+
+
+
+

Events

- - - + + + + + +
-
-
-
-
+
+
+
+

GroupChat

- - - + + + + + +
-
-
-
-
+
+
+
+ -
-
-
+
+
+
+ -
-
-
+
+
+
+ -
-
-
+
+
+
+

Label

-
-
-
- Label(client, labelData) -
-
-
-
- Label#getChats() -
-
-
-
-
-
-
-
- Label#hexColor -
-
-
-
- Label#id -
-
-
-
-
-
-
-
- Label#name -
-
-
-
-
+
+
+
+ Label(client, labelData) +
+
+
+
+ Label#getChats() +
+
+
+
+
+ +
+
+
+ Label#hexColor +
+
+
+
+ Label#id +
+
+
+
+
+ +
+
+
+ Label#name +
+
+
+
+
+
-
-
-
-
+
+
+
+

LegacySessionAuth

-
-
-
- LegacySessionAuth(options) -
-
-
-
-
-
-
-
-
-
-
-
-
+ + +
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

List

- -
-
-
- List#description -
-
-
-
- List#footer -
-
-
-
- List#sections -
-
-
-
-
-
-
-
- List#title -
-
-
-
-
+ + +
+
+
+ List#description +
+
+
+
+ List#footer +
+
+
+
+ List#sections +
+
+
+
+
+ +
+
+
+ List#title +
+
+
+
+
+
-
-
-
-
+
+
+
+

LocalAuth

-
-
-
- LocalAuth(options) -
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ LocalAuth(options) +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

Location

- -
-
-
- Location#latitude -
-
-
-
- Location#longitude -
-
-
-
-
-
-
-
-
+ + +
+
+
+ Location#latitude +
+
+
+
+ Location#longitude +
+
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

Message

- - - + + + + +
+
+
+ Message#links +
+
+
+
+ Message#location +
+
+
+
+ Message#mediaKey +
+
+
+
+ Message#mentionedIds +
+
+
+
+ Message#orderId +
+
+
+
+ Message#rawData +
+
+
+
+ Message#react(reaction) +
+
+
+
+ Message#reload() +
+
+
+
+ Message#reply(content[, chatId][, options]) +
+
+
+
+ Message#star() +
+
+
+
+ Message#timestamp +
+
+
+
+ Message#to +
+
+
+
+ Message#token +
+
+
+
+ Message#type +
+
+
+
+ Message#unstar() +
+
+
+
+ Message#vCards +
+
+
+
+
+
-
-
-
-
+
+
+
+

MessageAck

-
-
-
- MessageAck.ACK_DEVICE -
-
-
-
- MessageAck.ACK_ERROR -
-
-
-
-
-
-
-
- MessageAck.ACK_PENDING -
-
-
-
- MessageAck.ACK_PLAYED -
-
-
-
-
-
-
-
- MessageAck.ACK_READ -
-
-
-
- MessageAck.ACK_SERVER -
-
-
-
-
+
+
+
+ MessageAck.ACK_DEVICE +
+
+
+
+ MessageAck.ACK_ERROR +
+
+
+
+
+ + + +
+
+
+ MessageAck.ACK_READ +
+
+
+
+ MessageAck.ACK_SERVER +
+
+
+
+
+
-
-
-
-
+
+
+
+ -
-
-
+
+
+
+

MessageTypes

- - - + + + + + +
-
-
-
-
+
+
+
+

NoAuth

-
-
-
- NoAuth() -
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ NoAuth() +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

Order

-
-
-
- Order() -
-
-
-
- Order#createdAt -
-
-
-
-
-
-
-
- Order#currency -
-
-
-
- Order#subtotal -
-
-
-
-
-
-
-
- Order#total -
-
-
-
-
+
+
+
+ Order() +
+
+
+
+ Order#createdAt +
+
+
+
+
+ +
+
+
+ Order#currency +
+
+
+
+ Order#subtotal +
+
+
+
+
+ +
+
+
+ Order#total +
+
+
+
+
+
-
-
-
-
+
+
+
+ -
-
-
+
+
+
+

PrivateChat

- - - + + + + + +
-
-
-
-
+
+
+
+

PrivateContact

- - - + + + + + +
-
-
-
-
+
+
+
+

Product

-
-
-
- Product() -
-
-
-
- Product#currency -
-
-
-
- Product#data -
-
-
-
-
-
-
-
- Product#id -
-
-
-
- Product#name -
-
-
-
- Product#price -
-
-
-
-
-
-
-
- Product#quantity -
-
-
-
- Product#thumbnailUrl -
-
-
-
-
+
+
+
+ Product() +
+
+
+
+ Product#currency +
+
+
+
+ Product#data +
+
+
+
+
+ +
+
+
+ Product#id +
+
+
+
+ Product#name +
+
+
+
+ Product#price +
+
+
+
+
+ +
+
+
+ Product#quantity +
+
+
+
+ Product#thumbnailUrl +
+
+
+
+
+
-
-
-
-
+
+
+
+

ProductMetadata

- - -
-
-
-
+ + + + +
+
+
+
+
-
-
-
-
+
+
+
+

Reaction

-
-
-
- Reaction() -
-
-
-
- Reaction#ack -
-
-
-
- Reaction#id -
-
-
-
- Reaction#msgId -
-
-
-
-
-
-
-
- Reaction#orphan -
-
-
-
- Reaction#orphanReason -
-
-
-
- Reaction#reaction -
-
-
-
- Reaction#read -
-
-
-
-
-
-
-
- Reaction#senderId -
-
-
-
- Reaction#timestamp -
-
-
-
-
+
+
+
+ Reaction() +
+
+
+
+ Reaction#ack +
+
+
+
+ Reaction#id +
+
+
+
+ Reaction#msgId +
+
+
+
+
+ +
+
+
+ Reaction#orphan +
+
+
+
+ Reaction#orphanReason +
+
+
+
+ Reaction#reaction +
+
+
+
+ Reaction#read +
+
+
+
+
+ +
+
+
+ Reaction#senderId +
+
+
+
+ Reaction#timestamp +
+
+
+
+
+
-
-
-
-
+
+
+
+

RemoteAuth

-
-
-
- RemoteAuth(options) -
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ RemoteAuth(options) +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
-
-
-
-
+
+
+
+

Status

-
-
-
- Status.AUTHENTICATING -
-
-
-
-
-
-
-
- Status.INITIALIZING -
-
-
-
-
-
-
-
- Status.READY -
-
-
-
-
+
+
+
+ Status.AUTHENTICATING +
+
+
+
+
+ +
+
+
+ Status.INITIALIZING +
+
+
+
+
+ +
+
+
+ Status.READY +
+
+
+
+
+
-
-
-
-
+
+
+
+ -
-
-
+
+
+
+

WAState

-
-
-
- WAState.CONFLICT -
-
-
-
- WAState.CONNECTED -
-
-
-
- WAState.DEPRECATED_VERSION -
-
-
-
- WAState.OPENING -
-
-
-
-
-
-
-
- WAState.PAIRING -
-
-
-
- WAState.PROXYBLOCK -
-
-
-
- WAState.SMB_TOS_BLOCK -
-
-
-
- WAState.TIMEOUT -
-
-
-
-
-
-
-
- WAState.TOS_BLOCK -
-
-
-
- WAState.UNLAUNCHED -
-
-
-
- WAState.UNPAIRED -
-
-
-
- WAState.UNPAIRED_IDLE -
-
-
-
-
+
+
+
+ WAState.CONFLICT +
+
+
+
+ WAState.CONNECTED +
+
+
+
+ WAState.DEPRECATED_VERSION +
+
+
+
+ WAState.OPENING +
+
+
+
+
+ +
+
+
+ WAState.PAIRING +
+
+
+
+ WAState.PROXYBLOCK +
+
+
+
+ WAState.SMB_TOS_BLOCK +
+
+
+
+ WAState.TIMEOUT +
+
+
+
+
+ +
+
+
+ WAState.TOS_BLOCK +
+
+
+
+ WAState.UNLAUNCHED +
+
+
+
+ WAState.UNPAIRED +
+
+
+
+ WAState.UNPAIRED_IDLE +
+
+
+
+
+
-
-
-
-
-

- -

- -
- -
- - - - - - - - - \ No newline at end of file + + + + + + + + + +
+ +
+ + + + + + + + diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 9298998739..d43cdbadbc 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Base.js + whatsapp-web.js 1.20.0 » Source: structures/Base.js @@ -15,7 +15,7 @@ @@ -60,7 +60,7 @@

Source: structures/Base.js

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index 3b5feb76e9..1912469bd0 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/BusinessContact.js + whatsapp-web.js 1.20.0 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@ @@ -59,7 +59,7 @@

Source: structures/BusinessContact.js

diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html index 7637c6ca05..96a7203c7f 100644 --- a/docs/structures_Buttons.js.html +++ b/docs/structures_Buttons.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Buttons.js + whatsapp-web.js 1.20.0 » Source: structures/Buttons.js @@ -15,7 +15,7 @@ @@ -120,7 +120,7 @@

Source: structures/Buttons.js

diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html index 09504d6944..98dfdfff87 100644 --- a/docs/structures_Call.js.html +++ b/docs/structures_Call.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Call.js + whatsapp-web.js 1.20.0 » Source: structures/Call.js @@ -15,7 +15,7 @@ @@ -114,7 +114,7 @@

Source: structures/Call.js

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index e470070c97..9baaa840a2 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Chat.js + whatsapp-web.js 1.20.0 » Source: structures/Chat.js @@ -15,7 +15,7 @@ @@ -106,6 +106,12 @@

Source: structures/Chat.js

*/ this.muteExpiration = data.muteExpiration; + /** + * Last message fo chat + * @type {Message} + */ + this.lastMessage = data.lastMessage ? new Message(super.client, data.lastMessage) : undefined; + return super._patch(data); } @@ -299,7 +305,7 @@

Source: structures/Chat.js

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index 5c59f8448d..d7878b8e70 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/ClientInfo.js + whatsapp-web.js 1.20.0 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@ @@ -109,7 +109,7 @@

Source: structures/ClientInfo.js

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 9659220f02..bce1f316d5 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Contact.js + whatsapp-web.js 1.20.0 » Source: structures/Contact.js @@ -15,7 +15,7 @@ @@ -245,7 +245,7 @@

Source: structures/Contact.js

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index 03ef7ee6ac..737830fd4c 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/GroupChat.js + whatsapp-web.js 1.20.0 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@ @@ -244,6 +244,31 @@

Source: structures/GroupChat.js

return true; } + /** + * Deletes the group's picture. + * @returns {Promise&lt;boolean>} Returns true if the picture was properly deleted. This can return false if the user does not have the necessary permissions. + */ + async deletePicture() { + const success = await this.client.pupPage.evaluate((chatid) => { + return window.WWebJS.deletePicture(chatid); + }, this.id._serialized); + + return success; + } + + /** + * Sets the group's picture. + * @param {MessageMedia} media + * @returns {Promise&lt;boolean>} Returns true if the picture was properly updated. This can return false if the user does not have the necessary permissions. + */ + async setPicture(media) { + const success = await this.client.pupPage.evaluate((chatid, media) => { + return window.WWebJS.setPicture(chatid, media); + }, this.id._serialized, media); + + return success; + } + /** * Gets the invite code for a specific group * @returns {Promise&lt;string>} Group's invite code @@ -294,7 +319,7 @@

Source: structures/GroupChat.js

diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html index 8885d690d3..4c3a80c695 100644 --- a/docs/structures_GroupNotification.js.html +++ b/docs/structures_GroupNotification.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/GroupNotification.js + whatsapp-web.js 1.20.0 » Source: structures/GroupNotification.js @@ -15,7 +15,7 @@ @@ -143,7 +143,7 @@

Source: structures/GroupNotification.js

diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html index 0085387f54..e30b9a3f60 100644 --- a/docs/structures_Label.js.html +++ b/docs/structures_Label.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Label.js + whatsapp-web.js 1.20.0 » Source: structures/Label.js @@ -15,7 +15,7 @@ @@ -88,7 +88,7 @@

Source: structures/Label.js

diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html index 4939fa15bd..a258dd4b46 100644 --- a/docs/structures_List.js.html +++ b/docs/structures_List.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/List.js + whatsapp-web.js 1.20.0 » Source: structures/List.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/List.js

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index 2e263b664b..cb490a8dbe 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Location.js + whatsapp-web.js 1.20.0 » Source: structures/Location.js @@ -15,7 +15,7 @@ @@ -71,7 +71,7 @@

Source: structures/Location.js

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index 42962cb01a..e86248cfbb 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Message.js + whatsapp-web.js 1.20.0 » Source: structures/Message.js @@ -15,7 +15,7 @@ @@ -36,7 +36,8 @@

Source: structures/Message.js

const Location = require('./Location'); const Order = require('./Order'); const Payment = require('./Payment'); -const { MessageTypes } = require('../util/Constants'); +const Reaction = require('./Reaction'); +const {MessageTypes} = require('../util/Constants'); /** * Represents a Message on WhatsApp @@ -119,8 +120,7 @@

Source: structures/Message.js

* String that represents from which device type the message was sent * @type {string} */ - this.deviceType = data.id.id.length > 21 ? 'android' : data.id.id.substring(0, 2) == '3A' ? 'ios' : 'web'; - + this.deviceType = typeof data.id.id === 'string' &amp;&amp; data.id.id.length > 21 ? 'android' : typeof data.id.id === 'string' &amp;&amp; data.id.id.substring(0, 2) === '3A' ? 'ios' : 'web'; /** * Indicates if the message was forwarded * @type {boolean} @@ -139,7 +139,7 @@

Source: structures/Message.js

* Indicates if the message is a status update * @type {boolean} */ - this.isStatus = data.isStatusV3; + this.isStatus = data.isStatusV3 || data.id.remote === 'status@broadcast'; /** * Indicates if the message was starred @@ -165,6 +165,12 @@

Source: structures/Message.js

*/ this.hasQuotedMsg = data.quotedMsg ? true : false; + /** + * Indicates whether there are reactions to the message + * @type {boolean} + */ + this.hasReaction = data.hasReaction ? true : false; + /** * Indicates the duration of the message in seconds * @type {string} @@ -467,15 +473,16 @@

Source: structures/Message.js

* @param {?boolean} everyone If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat. */ async delete(everyone) { - await this.client.pupPage.evaluate((msgId, everyone) => { + await this.client.pupPage.evaluate(async (msgId, everyone) => { let msg = window.Store.Msg.get(msgId); - + let chat = await window.Store.Chat.find(msg.id.remote); + const canRevoke = window.Store.MsgActionChecks.canSenderRevokeMsg(msg) || window.Store.MsgActionChecks.canAdminRevokeMsg(msg); if (everyone &amp;&amp; canRevoke) { - return window.Store.Cmd.sendRevokeMsgs(msg.chat, [msg], { type: msg.id.fromMe ? 'Sender' : 'Admin' }); + return window.Store.Cmd.sendRevokeMsgs(chat, [msg], { clearMedia: true, type: msg.id.fromMe ? 'Sender' : 'Admin' }); } - return window.Store.Cmd.sendDeleteMsgs(msg.chat, [msg], true); + return window.Store.Cmd.sendDeleteMsgs(chat, [msg], true); }, this.id._serialized, everyone); } @@ -483,11 +490,12 @@

Source: structures/Message.js

* Stars this message */ async star() { - await this.client.pupPage.evaluate((msgId) => { + await this.client.pupPage.evaluate(async (msgId) => { let msg = window.Store.Msg.get(msgId); - + if (window.Store.MsgActionChecks.canStarMsg(msg)) { - return window.Store.Cmd.sendStarMsgs(msg.chat, [msg], false); + let chat = await window.Store.Chat.find(msg.id.remote); + return window.Store.Cmd.sendStarMsgs(chat, [msg], false); } }, this.id._serialized); } @@ -496,11 +504,12 @@

Source: structures/Message.js

* Unstars this message */ async unstar() { - await this.client.pupPage.evaluate((msgId) => { + await this.client.pupPage.evaluate(async (msgId) => { let msg = window.Store.Msg.get(msgId); if (window.Store.MsgActionChecks.canStarMsg(msg)) { - return window.Store.Cmd.sendUnstarMsgs(msg.chat, [msg], false); + let chat = await window.Store.Chat.find(msg.id.remote); + return window.Store.Cmd.sendUnstarMsgs(chat, [msg], false); } }, this.id._serialized); } @@ -560,6 +569,44 @@

Source: structures/Message.js

} return undefined; } + + + /** + * Reaction List + * @typedef {Object} ReactionList + * @property {string} id Original emoji + * @property {string} aggregateEmoji aggregate emoji + * @property {boolean} hasReactionByMe Flag who sent the reaction + * @property {Array&lt;Reaction>} senders Reaction senders, to this message + */ + + /** + * Gets the reactions associated with the given message + * @return {Promise&lt;ReactionList[]>} + */ + async getReactions() { + if (!this.hasReaction) { + return undefined; + } + + const reactions = await this.client.pupPage.evaluate(async (msgId) => { + const msgReactions = await window.Store.Reactions.find(msgId); + if (!msgReactions || !msgReactions.reactions.length) return null; + return msgReactions.reactions.serialize(); + }, this.id._serialized); + + if (!reactions) { + return undefined; + } + + return reactions.map(reaction => { + reaction.senders = reaction.senders.map(sender => { + sender.timestamp = Math.round(sender.timestamp / 1000); + return new Reaction(this.client, sender); + }); + return reaction; + }); + } } module.exports = Message; @@ -573,7 +620,7 @@

Source: structures/Message.js

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index 5648e76c25..eac0353eff 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/MessageMedia.js + whatsapp-web.js 1.20.0 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@ @@ -150,7 +150,7 @@

Source: structures/MessageMedia.js

diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html index 3da4befad2..ab36e6683d 100644 --- a/docs/structures_Order.js.html +++ b/docs/structures_Order.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Order.js + whatsapp-web.js 1.20.0 » Source: structures/Order.js @@ -15,7 +15,7 @@ @@ -90,7 +90,7 @@

Source: structures/Order.js

diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html index 2392de0997..197016bc38 100644 --- a/docs/structures_Payment.js.html +++ b/docs/structures_Payment.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Payment.js + whatsapp-web.js 1.20.0 » Source: structures/Payment.js @@ -15,7 +15,7 @@ @@ -118,7 +118,7 @@

Source: structures/Payment.js

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 46d5c2ee8e..a247712941 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/PrivateChat.js + whatsapp-web.js 1.20.0 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateChat.js

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 0bf52689eb..d30f3c3453 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/PrivateContact.js + whatsapp-web.js 1.20.0 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@ @@ -51,7 +51,7 @@

Source: structures/PrivateContact.js

diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html index 6a42dbf231..c991bc9615 100644 --- a/docs/structures_Product.js.html +++ b/docs/structures_Product.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Product.js + whatsapp-web.js 1.20.0 » Source: structures/Product.js @@ -15,7 +15,7 @@ @@ -106,7 +106,7 @@

Source: structures/Product.js

diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html index be6fa76ff5..e370c26f77 100644 --- a/docs/structures_ProductMetadata.js.html +++ b/docs/structures_ProductMetadata.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/ProductMetadata.js + whatsapp-web.js 1.20.0 » Source: structures/ProductMetadata.js @@ -15,7 +15,7 @@ @@ -63,7 +63,7 @@

Source: structures/ProductMetadata.js

diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html index e4e4b009a0..2af40deb86 100644 --- a/docs/structures_Reaction.js.html +++ b/docs/structures_Reaction.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: structures/Reaction.js + whatsapp-web.js 1.20.0 » Source: structures/Reaction.js @@ -15,7 +15,7 @@ @@ -107,7 +107,7 @@

Source: structures/Reaction.js

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index 9389185d78..2d155800c6 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: util/Constants.js + whatsapp-web.js 1.20.0 » Source: util/Constants.js @@ -15,7 +15,7 @@ @@ -44,7 +44,8 @@

Source: util/Constants.js

takeoverTimeoutMs: 0, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36', ffmpegPath: 'ffmpeg', - bypassCSP: false + bypassCSP: false, + proxyAuthentication: undefined }; /** @@ -67,15 +68,20 @@

Source: util/Constants.js

AUTHENTICATED: 'authenticated', AUTHENTICATION_FAILURE: 'auth_failure', READY: 'ready', + CHAT_REMOVED: 'chat_removed', + CHAT_ARCHIVED: 'chat_archived', MESSAGE_RECEIVED: 'message', MESSAGE_CREATE: 'message_create', MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone', MESSAGE_REVOKED_ME: 'message_revoke_me', MESSAGE_ACK: 'message_ack', + UNREAD_COUNT: 'unread_count', MESSAGE_REACTION: 'message_reaction', MEDIA_UPLOADED: 'media_uploaded', + CONTACT_CHANGED: 'contact_changed', GROUP_JOIN: 'group_join', GROUP_LEAVE: 'group_leave', + GROUP_ADMIN_CHANGED: 'group_admin_changed', GROUP_UPDATE: 'group_update', QR_RECEIVED: 'qr', LOADING_SCREEN: 'loading_screen', @@ -200,7 +206,7 @@

Source: util/Constants.js

diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html index 17abf6d599..eb5aea6ad6 100644 --- a/docs/util_InterfaceController.js.html +++ b/docs/util_InterfaceController.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: util/InterfaceController.js + whatsapp-web.js 1.20.0 » Source: util/InterfaceController.js @@ -15,7 +15,7 @@ @@ -81,7 +81,9 @@

Source: util/InterfaceController.js

async openChatWindowAt(msgId) { await this.pupPage.evaluate(async msgId => { let msg = await window.Store.Msg.get(msgId); - await window.Store.Cmd.openChatAt(msg.chat, msg.chat.getSearchContext(msg)); + let chat = await window.Store.Chat.find(msg.id.remote); + let searchContext = await window.Store.SearchContext(chat,msg); + await window.Store.Cmd.openChatAt(chat, searchContext); }, msgId); } @@ -101,7 +103,7 @@

Source: util/InterfaceController.js

*/ async closeRightDrawer() { await this.pupPage.evaluate(async () => { - await window.Store.Cmd.closeDrawerRight(); + await window.Store.DrawerManager.closeDrawerRight(); }); } @@ -164,7 +166,7 @@

Source: util/InterfaceController.js

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index ee2b4b4c50..e852f0b135 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -2,9 +2,9 @@ - + - whatsapp-web.js 1.19.5 » Source: util/Util.js + whatsapp-web.js 1.20.0 » Source: util/Util.js @@ -15,7 +15,7 @@ @@ -225,7 +225,7 @@

Source: util/Util.js

diff --git a/package.json b/package.json index f272b46e3b..e951c56df0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.20.0-alpha.0", + "version": "1.20.0", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "typings": "./index.d.ts", From 8ae0c0d4843993a25f6ec0e50e337ddc5e4e6219 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Mon, 29 May 2023 02:31:03 -0400 Subject: [PATCH 059/139] feat(reliability): WhatsApp Web version caching (#1847) * feat: use specific whatsapp web version * add constants to version updater * configurable caches * rename * typings * rm extraneous export * missing from the rename * rm version resolver * match readme version * use try-catch * only persist if cache miss --- .gitignore | 5 +++- index.d.ts | 22 ++++++++++++++ src/Client.js | 33 +++++++++++++++++++++ src/util/Constants.js | 4 +++ src/webCache/LocalWebCache.js | 43 ++++++++++++++++++++++++++++ src/webCache/RemoteWebCache.js | 40 ++++++++++++++++++++++++++ src/webCache/WebCache.js | 14 +++++++++ src/webCache/WebCacheFactory.js | 20 +++++++++++++ tools/version-checker/update-version | 25 ++++++++++------ 9 files changed, 197 insertions(+), 9 deletions(-) create mode 100644 src/webCache/LocalWebCache.js create mode 100644 src/webCache/RemoteWebCache.js create mode 100644 src/webCache/WebCache.js create mode 100644 src/webCache/WebCacheFactory.js diff --git a/.gitignore b/.gitignore index 79f64679f2..12b53d4ca5 100644 --- a/.gitignore +++ b/.gitignore @@ -70,4 +70,7 @@ typings/ # Test sessions *session.json -.wwebjs_auth/ \ No newline at end of file +.wwebjs_auth/ + +# local version cache +.wwebjs_cache/ diff --git a/index.d.ts b/index.d.ts index 38d2ebbd50..4b686a69dd 100644 --- a/index.d.ts +++ b/index.d.ts @@ -365,6 +365,10 @@ declare namespace WAWebJS { puppeteer?: puppeteer.PuppeteerNodeLaunchOptions & puppeteer.ConnectOptions /** Determines how to save and restore sessions. Will use LegacySessionAuth if options.session is set. Otherwise, NoAuth will be used. */ authStrategy?: AuthStrategy, + /** The version of WhatsApp Web to use. Use options.webVersionCache to configure how the version is retrieved. */ + webVersion?: string, + /** Determines how to retrieve the WhatsApp Web version specified in options.webVersion. */ + webVersionCache?: WebCacheOptions, /** How many times should the qrcode be refreshed before giving up * @default 0 (disabled) */ qrMaxRetries?: number, @@ -392,6 +396,24 @@ declare namespace WAWebJS { proxyAuthentication?: {username: string, password: string} | undefined } + export interface LocalWebCacheOptions { + type: 'local', + path?: string, + strict?: boolean + } + + export interface RemoteWebCacheOptions { + type: 'remote', + remotePath: string, + strict?: boolean + } + + export interface NoWebCacheOptions { + type: 'none' + } + + export type WebCacheOptions = NoWebCacheOptions | LocalWebCacheOptions | RemoteWebCacheOptions; + /** * Base class which all authentication strategies extend */ diff --git a/src/Client.js b/src/Client.js index fef8e4c456..d59bac6fde 100644 --- a/src/Client.js +++ b/src/Client.js @@ -10,6 +10,7 @@ const { WhatsWebURL, DefaultOptions, Events, WAState } = require('./util/Constan const { ExposeStore, LoadUtils } = require('./util/Injected'); const ChatFactory = require('./factories/ChatFactory'); const ContactFactory = require('./factories/ContactFactory'); +const WebCacheFactory = require('./webCache/WebCacheFactory'); const { ClientInfo, Message, MessageMedia, Contact, Location, GroupNotification, Label, Call, Buttons, List, Reaction, Chat } = require('./structures'); const LegacySessionAuth = require('./authStrategies/LegacySessionAuth'); const NoAuth = require('./authStrategies/NoAuth'); @@ -19,6 +20,8 @@ const NoAuth = require('./authStrategies/NoAuth'); * @extends {EventEmitter} * @param {object} options - Client options * @param {AuthStrategy} options.authStrategy - Determines how to save and restore sessions. Will use LegacySessionAuth if options.session is set. Otherwise, NoAuth will be used. + * @param {string} options.webVersion - The version of WhatsApp Web to use. Use options.webVersionCache to configure how the version is retrieved. + * @param {object} options.webVersionCache - Determines how to retrieve the WhatsApp Web version. Defaults to a local cache (LocalWebCache) that falls back to latest if the requested version is not found. * @param {number} options.authTimeoutMs - Timeout for authentication selector in puppeteer * @param {object} options.puppeteer - Puppeteer launch options. View docs here: https://github.com/puppeteer/puppeteer/ * @param {number} options.qrMaxRetries - How many times should the qrcode be refreshed before giving up @@ -115,6 +118,7 @@ class Client extends EventEmitter { this.pupPage = page; await this.authStrategy.afterBrowserInitialized(); + await this.initWebVersionCache(); await page.goto(WhatsWebURL, { waitUntil: 'load', @@ -638,6 +642,35 @@ class Client extends EventEmitter { }); } + async initWebVersionCache() { + const { type: webCacheType, ...webCacheOptions } = this.options.webVersionCache; + const webCache = WebCacheFactory.createWebCache(webCacheType, webCacheOptions); + + const requestedVersion = this.options.webVersion; + const versionContent = await webCache.resolve(requestedVersion); + + if(versionContent) { + await this.pupPage.setRequestInterception(true); + this.pupPage.on('request', async (req) => { + if(req.url() === WhatsWebURL) { + req.respond({ + status: 200, + contentType: 'text/html', + body: versionContent + }); + } else { + req.continue(); + } + }); + } else { + this.pupPage.on('response', async (res) => { + if(res.ok() && res.url() === WhatsWebURL) { + await webCache.persist(await res.text()); + } + }); + } + } + /** * Closes the client */ diff --git a/src/util/Constants.js b/src/util/Constants.js index aa1005d155..96de7130d3 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -7,6 +7,10 @@ exports.DefaultOptions = { headless: true, defaultViewport: null }, + webVersion: '2.2306.7', + webVersionCache: { + type: 'local', + }, authTimeoutMs: 0, qrMaxRetries: 0, takeoverOnConflict: false, diff --git a/src/webCache/LocalWebCache.js b/src/webCache/LocalWebCache.js new file mode 100644 index 0000000000..a377f559b5 --- /dev/null +++ b/src/webCache/LocalWebCache.js @@ -0,0 +1,43 @@ +const path = require('path'); +const fs = require('fs'); + +const { WebCache, VersionResolveError } = require('./WebCache'); + +/** + * LocalWebCache - Fetches a WhatsApp Web version from a local file store + * @param {object} options - options + * @param {string} options.path - Path to the directory where cached versions are saved, default is: "./.wwebjs_cache/" + * @param {boolean} options.strict - If true, will throw an error if the requested version can't be fetched. If false, will resolve to the latest version. + */ +class LocalWebCache extends WebCache { + constructor(options = {}) { + super(); + + this.path = options.path || './.wwebjs_cache/'; + this.strict = options.strict || false; + } + + async resolve(version) { + const filePath = path.join(this.path, `${version}.html`); + + try { + return fs.readFileSync(filePath, 'utf-8'); + } + catch (err) { + if (this.strict) throw new VersionResolveError(`Couldn't load version ${version} from the cache`); + return null; + } + } + + async persist(indexHtml) { + // extract version from index (e.g. manifest-2.2206.9.json -> 2.2206.9) + const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1]; + if(!version) return; + + const filePath = path.join(this.path, `${version}.html`); + fs.mkdirSync(this.path, { recursive: true }); + fs.writeFileSync(filePath, indexHtml); + } +} + +module.exports = LocalWebCache; \ No newline at end of file diff --git a/src/webCache/RemoteWebCache.js b/src/webCache/RemoteWebCache.js new file mode 100644 index 0000000000..04da0f19ff --- /dev/null +++ b/src/webCache/RemoteWebCache.js @@ -0,0 +1,40 @@ +const fetch = require('node-fetch'); +const { WebCache, VersionResolveError } = require('./WebCache'); + +/** + * RemoteWebCache - Fetches a WhatsApp Web version index from a remote server + * @param {object} options - options + * @param {string} options.remotePath - Endpoint that should be used to fetch the version index. Use {version} as a placeholder for the version number. + * @param {boolean} options.strict - If true, will throw an error if the requested version can't be fetched. If false, will resolve to the latest version. Defaults to false. + */ +class RemoteWebCache extends WebCache { + constructor(options = {}) { + super(); + + if (!options.remotePath) throw new Error('webVersionCache.remotePath is required when using the remote cache'); + this.remotePath = options.remotePath; + this.strict = options.strict || false; + } + + async resolve(version) { + const remotePath = this.remotePath.replace('{version}', version); + + try { + const cachedRes = await fetch(remotePath); + if (cachedRes.ok) { + return cachedRes.text(); + } + } catch (err) { + console.error(`Error fetching version ${version} from remote`, err); + } + + if (this.strict) throw new VersionResolveError(`Couldn't load version ${version} from the archive`); + return null; + } + + async persist() { + // Nothing to do here + } +} + +module.exports = RemoteWebCache; \ No newline at end of file diff --git a/src/webCache/WebCache.js b/src/webCache/WebCache.js new file mode 100644 index 0000000000..4460218325 --- /dev/null +++ b/src/webCache/WebCache.js @@ -0,0 +1,14 @@ +/** + * Default implementation of a web version cache that does nothing. + */ +class WebCache { + async resolve() { return null; } + async persist() { } +} + +class VersionResolveError extends Error { } + +module.exports = { + WebCache, + VersionResolveError +}; \ No newline at end of file diff --git a/src/webCache/WebCacheFactory.js b/src/webCache/WebCacheFactory.js new file mode 100644 index 0000000000..2c4fda71ec --- /dev/null +++ b/src/webCache/WebCacheFactory.js @@ -0,0 +1,20 @@ +const RemoteWebCache = require('./RemoteWebCache'); +const LocalWebCache = require('./LocalWebCache'); +const { WebCache } = require('./WebCache'); + +const createWebCache = (type, options) => { + switch (type) { + case 'remote': + return new RemoteWebCache(options); + case 'local': + return new LocalWebCache(options); + case 'none': + return new WebCache(); + default: + throw new Error(`Invalid WebCache type ${type}`); + } +}; + +module.exports = { + createWebCache, +}; \ No newline at end of file diff --git a/tools/version-checker/update-version b/tools/version-checker/update-version index 3afbb275ed..dc68d2381b 100755 --- a/tools/version-checker/update-version +++ b/tools/version-checker/update-version @@ -18,15 +18,24 @@ const getCurrentVersion = () => { } }; +const updateInFile = (filePath, oldVersion, newVersion) => { + const originalFile = fs.readFileSync(filePath); + const newFile = originalFile.toString().replaceAll(oldVersion, newVersion); + + fs.writeFileSync(filePath, newFile); +}; + const updateVersion = async (oldVersion, newVersion) => { - const readmePath = '../../README.md'; - - const readme = fs.readFileSync(readmePath); - const newReadme = readme.toString().replaceAll(oldVersion, newVersion); - - fs.writeFileSync(readmePath, newReadme); - fs.writeFileSync('./.version', newVersion); - + const filesToUpdate = [ + '../../src/util/Constants.js', + '../../README.md', + ]; + + for (const file of filesToUpdate) { + updateInFile(file, oldVersion, newVersion); + } + + fs.writeFileSync('./.version', newVersion); }; (async () => { From 7cf4532258c85ab4c13996efef7a9f6855b174a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 02:31:25 -0400 Subject: [PATCH 060/139] Update supported WhatsApp Web version to v2.2322.15 (#2004) Co-authored-by: pedroslopez --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index adb1cfec91..2a7d39ce30 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2306.7](https://img.shields.io/badge/WhatsApp_Web-2.2306.7-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2322.15](https://img.shields.io/badge/WhatsApp_Web-2.2322.15-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index e7197d623d..1a9d27c59f 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2306.7 \ No newline at end of file +2.2322.15 \ No newline at end of file From 2574c9d4871f9f5e52aa1faaf0d953fadbf1e509 Mon Sep 17 00:00:00 2001 From: "Pedro S. Lopez" Date: Mon, 29 May 2023 02:31:42 -0400 Subject: [PATCH 061/139] Revert "Update supported WhatsApp Web version to v2.2322.15 (#2004)" (#2235) This reverts commit 7cf4532258c85ab4c13996efef7a9f6855b174a7. --- README.md | 2 +- tools/version-checker/.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2a7d39ce30..adb1cfec91 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2322.15](https://img.shields.io/badge/WhatsApp_Web-2.2322.15-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2306.7](https://img.shields.io/badge/WhatsApp_Web-2.2306.7-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/tools/version-checker/.version b/tools/version-checker/.version index 1a9d27c59f..e7197d623d 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2322.15 \ No newline at end of file +2.2306.7 \ No newline at end of file From 1810852c0165ee05da5e400f1305626c3f1a9ebe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 02:33:06 -0400 Subject: [PATCH 062/139] Update supported WhatsApp Web version to v2.2322.15 (#2236) Co-authored-by: pedroslopez --- README.md | 2 +- src/util/Constants.js | 2 +- tools/version-checker/.version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index adb1cfec91..2a7d39ce30 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2306.7](https://img.shields.io/badge/WhatsApp_Web-2.2306.7-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) +[![npm](https://img.shields.io/npm/v/whatsapp-web.js.svg)](https://www.npmjs.com/package/whatsapp-web.js) [![Depfu](https://badges.depfu.com/badges/4a65a0de96ece65fdf39e294e0c8dcba/overview.svg)](https://depfu.com/github/pedroslopez/whatsapp-web.js?project_id=9765) ![WhatsApp_Web 2.2322.15](https://img.shields.io/badge/WhatsApp_Web-2.2322.15-brightgreen.svg) [![Discord Chat](https://img.shields.io/discord/698610475432411196.svg?logo=discord)](https://discord.gg/H7DqQs4) # whatsapp-web.js A WhatsApp API client that connects through the WhatsApp Web browser app diff --git a/src/util/Constants.js b/src/util/Constants.js index 96de7130d3..5a0efc7fc9 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -7,7 +7,7 @@ exports.DefaultOptions = { headless: true, defaultViewport: null }, - webVersion: '2.2306.7', + webVersion: '2.2322.15', webVersionCache: { type: 'local', }, diff --git a/tools/version-checker/.version b/tools/version-checker/.version index e7197d623d..1a9d27c59f 100644 --- a/tools/version-checker/.version +++ b/tools/version-checker/.version @@ -1 +1 @@ -2.2306.7 \ No newline at end of file +2.2322.15 \ No newline at end of file From 3dd4463478abb561efd83764abfbd88624dcf774 Mon Sep 17 00:00:00 2001 From: Humberto Zambrano Date: Mon, 29 May 2023 01:38:59 -0500 Subject: [PATCH 063/139] Fix caption in attached document sending messages (#2226) * Caption for attached document * Update Injected.js --------- Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com> Co-authored-by: Pedro S. Lopez --- src/util/Injected.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 76d134abe0..3f5aa96b5f 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -119,7 +119,10 @@ exports.LoadUtils = () => { forceDocument: options.sendMediaAsDocument, forceGif: options.sendVideoAsGif }); - + + if (options.caption){ + attOptions.caption = options.caption; + } content = options.sendMediaAsSticker ? undefined : attOptions.preview; delete options.attachment; From 01d23e8dff7c5e8b9a1fe33aab88fe4ba1e3a536 Mon Sep 17 00:00:00 2001 From: Pedro S Lopez Date: Mon, 29 May 2023 02:46:45 -0400 Subject: [PATCH 064/139] chore: mark version v1.21.0 --- docs/Base.html | 6 +- docs/BaseAuthStrategy.html | 6 +- docs/BusinessContact.html | 6 +- docs/Buttons.html | 6 +- docs/Call.html | 6 +- docs/Chat.html | 6 +- docs/Client.html | 36 ++++- docs/Client.js.html | 39 ++++- docs/ClientInfo.html | 6 +- docs/Contact.html | 6 +- docs/GroupChat.html | 6 +- docs/GroupNotification.html | 6 +- docs/InterfaceController.html | 6 +- docs/Label.html | 6 +- docs/LegacySessionAuth.html | 6 +- docs/List.html | 6 +- docs/LocalAuth.html | 6 +- docs/LocalWebCache.html | 135 ++++++++++++++++++ docs/Location.html | 6 +- docs/Message.html | 6 +- docs/MessageMedia.html | 6 +- docs/NoAuth.html | 6 +- docs/Order.html | 6 +- docs/PrivateChat.html | 6 +- docs/PrivateContact.html | 6 +- docs/Product.html | 6 +- docs/Reaction.html | 6 +- docs/RemoteAuth.html | 6 +- docs/RemoteWebCache.html | 135 ++++++++++++++++++ docs/Util.html | 6 +- docs/WebCache.html | 65 +++++++++ docs/authStrategies_BaseAuthStrategy.js.html | 6 +- docs/authStrategies_LegacySessionAuth.js.html | 6 +- docs/authStrategies_LocalAuth.js.html | 6 +- docs/authStrategies_NoAuth.js.html | 6 +- docs/authStrategies_RemoteAuth.js.html | 6 +- docs/global.html | 6 +- docs/index.html | 91 +++++++++++- docs/scripts/jsdoc-toc.js | 2 +- docs/structures_Base.js.html | 6 +- docs/structures_BusinessContact.js.html | 6 +- docs/structures_Buttons.js.html | 6 +- docs/structures_Call.js.html | 6 +- docs/structures_Chat.js.html | 6 +- docs/structures_ClientInfo.js.html | 6 +- docs/structures_Contact.js.html | 6 +- docs/structures_GroupChat.js.html | 6 +- docs/structures_GroupNotification.js.html | 6 +- docs/structures_Label.js.html | 6 +- docs/structures_List.js.html | 6 +- docs/structures_Location.js.html | 6 +- docs/structures_Message.js.html | 6 +- docs/structures_MessageMedia.js.html | 6 +- docs/structures_Order.js.html | 6 +- docs/structures_Payment.js.html | 6 +- docs/structures_PrivateChat.js.html | 6 +- docs/structures_PrivateContact.js.html | 6 +- docs/structures_Product.js.html | 6 +- docs/structures_ProductMetadata.js.html | 6 +- docs/structures_Reaction.js.html | 6 +- docs/util_Constants.js.html | 10 +- docs/util_InterfaceController.js.html | 6 +- docs/util_Util.js.html | 6 +- docs/webCache_LocalWebCache.js.html | 96 +++++++++++++ docs/webCache_RemoteWebCache.js.html | 93 ++++++++++++ docs/webCache_WebCache.js.html | 67 +++++++++ package.json | 2 +- 67 files changed, 919 insertions(+), 182 deletions(-) create mode 100644 docs/LocalWebCache.html create mode 100644 docs/RemoteWebCache.html create mode 100644 docs/WebCache.html create mode 100644 docs/webCache_LocalWebCache.js.html create mode 100644 docs/webCache_RemoteWebCache.js.html create mode 100644 docs/webCache_WebCache.js.html diff --git a/docs/Base.html b/docs/Base.html index c8c8fdbfc6..50d0054582 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: Base + whatsapp-web.js 1.21.0 » Class: Base @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new Base diff --git a/docs/BaseAuthStrategy.html b/docs/BaseAuthStrategy.html index ad240e7078..f7e2e6b601 100644 --- a/docs/BaseAuthStrategy.html +++ b/docs/BaseAuthStrategy.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: BaseAuthStrategy + whatsapp-web.js 1.21.0 » Class: BaseAuthStrategy @@ -15,7 +15,7 @@ @@ -50,7 +50,7 @@

new BaseAuthStrategy diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 9bb1f76989..c743d5374d 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: BusinessContact + whatsapp-web.js 1.21.0 » Class: BusinessContact @@ -15,7 +15,7 @@ @@ -326,7 +326,7 @@

unblock diff --git a/docs/Buttons.html b/docs/Buttons.html index 646c69c48b..71f3d22bbf 100644 --- a/docs/Buttons.html +++ b/docs/Buttons.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: Buttons + whatsapp-web.js 1.21.0 » Class: Buttons @@ -15,7 +15,7 @@ @@ -234,7 +234,7 @@

Parameter

diff --git a/docs/Call.html b/docs/Call.html index 9f6d2877c6..e93f9d216b 100644 --- a/docs/Call.html +++ b/docs/Call.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: Call + whatsapp-web.js 1.21.0 » Class: Call @@ -15,7 +15,7 @@ @@ -168,7 +168,7 @@

reject<
diff --git a/docs/Chat.html b/docs/Chat.html index f8d8d21af1..7fff01c1ae 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: Chat + whatsapp-web.js 1.21.0 » Class: Chat @@ -15,7 +15,7 @@ @@ -505,7 +505,7 @@

unpin diff --git a/docs/Client.html b/docs/Client.html index fcbbad8d30..7266ad5e0a 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.20.0 » Class: Client + whatsapp-web.js 1.21.0 » Class: Client @@ -15,7 +15,7 @@ @@ -26,7 +26,7 @@