diff --git a/docs/Base.html b/docs/Base.html
index 29de05a..30f0e0f 100644
--- a/docs/Base.html
+++ b/docs/Base.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Base
+ whatsapp-web.js 1.13.1 » Class: Base
@@ -15,7 +15,7 @@
diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html
index 68b964a..45e36d6 100644
--- a/docs/BusinessContact.html
+++ b/docs/BusinessContact.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: BusinessContact
+ whatsapp-web.js 1.13.1 » Class: BusinessContact
@@ -15,7 +15,7 @@
diff --git a/docs/Chat.html b/docs/Chat.html
index e9b02e0..e4be82e 100644
--- a/docs/Chat.html
+++ b/docs/Chat.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Chat
+ whatsapp-web.js 1.13.1 » Class: Chat
@@ -15,7 +15,7 @@
diff --git a/docs/Client.html b/docs/Client.html
index c00ebf8..e4988f5 100644
--- a/docs/Client.html
+++ b/docs/Client.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Client
+ whatsapp-web.js 1.13.1 » Class: Client
@@ -15,7 +15,7 @@
diff --git a/docs/Client.js.html b/docs/Client.js.html
index 03ddc82..2dacd44 100644
--- a/docs/Client.js.html
+++ b/docs/Client.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: Client.js
+ whatsapp-web.js 1.13.1 » Source: Client.js
@@ -15,7 +15,7 @@
diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html
index e3da6e1..c8a70eb 100644
--- a/docs/ClientInfo.html
+++ b/docs/ClientInfo.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: ClientInfo
+ whatsapp-web.js 1.13.1 » Class: ClientInfo
@@ -15,7 +15,7 @@
diff --git a/docs/Contact.html b/docs/Contact.html
index 1c654a8..0980264 100644
--- a/docs/Contact.html
+++ b/docs/Contact.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Contact
+ whatsapp-web.js 1.13.1 » Class: Contact
@@ -15,7 +15,7 @@
diff --git a/docs/GroupChat.html b/docs/GroupChat.html
index 5bfe258..a0bd191 100644
--- a/docs/GroupChat.html
+++ b/docs/GroupChat.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: GroupChat
+ whatsapp-web.js 1.13.1 » Class: GroupChat
@@ -15,7 +15,7 @@
diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html
index 3c365b6..cad6573 100644
--- a/docs/GroupNotification.html
+++ b/docs/GroupNotification.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: GroupNotification
+ whatsapp-web.js 1.13.1 » Class: GroupNotification
@@ -15,7 +15,7 @@
diff --git a/docs/InterfaceController.html b/docs/InterfaceController.html
index 9c60c8a..610c087 100644
--- a/docs/InterfaceController.html
+++ b/docs/InterfaceController.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: InterfaceController
+ whatsapp-web.js 1.13.1 » Class: InterfaceController
@@ -15,7 +15,7 @@
diff --git a/docs/Label.html b/docs/Label.html
index 913d607..b6a3ca6 100644
--- a/docs/Label.html
+++ b/docs/Label.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Label
+ whatsapp-web.js 1.13.1 » Class: Label
@@ -15,7 +15,7 @@
diff --git a/docs/Location.html b/docs/Location.html
index 2c60776..820c4f0 100644
--- a/docs/Location.html
+++ b/docs/Location.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Location
+ whatsapp-web.js 1.13.1 » Class: Location
@@ -15,7 +15,7 @@
diff --git a/docs/Message.html b/docs/Message.html
index 8a38b96..1fbbc0c 100644
--- a/docs/Message.html
+++ b/docs/Message.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Message
+ whatsapp-web.js 1.13.1 » Class: Message
@@ -15,7 +15,7 @@
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html
index d2b9486..baac6d2 100644
--- a/docs/MessageMedia.html
+++ b/docs/MessageMedia.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: MessageMedia
+ whatsapp-web.js 1.13.1 » Class: MessageMedia
@@ -15,7 +15,7 @@
diff --git a/docs/Order.html b/docs/Order.html
index 8625db3..d25a3f2 100644
--- a/docs/Order.html
+++ b/docs/Order.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Order
+ whatsapp-web.js 1.13.1 » Class: Order
@@ -15,7 +15,7 @@
diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html
index 7ff72b2..ea6b821 100644
--- a/docs/PrivateChat.html
+++ b/docs/PrivateChat.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: PrivateChat
+ whatsapp-web.js 1.13.1 » Class: PrivateChat
@@ -15,7 +15,7 @@
diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html
index c1bea7d..a24ea26 100644
--- a/docs/PrivateContact.html
+++ b/docs/PrivateContact.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: PrivateContact
+ whatsapp-web.js 1.13.1 » Class: PrivateContact
@@ -15,7 +15,7 @@
diff --git a/docs/Product.html b/docs/Product.html
index 97ab7e5..811fcba 100644
--- a/docs/Product.html
+++ b/docs/Product.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Product
+ whatsapp-web.js 1.13.1 » Class: Product
@@ -15,7 +15,7 @@
diff --git a/docs/Util.html b/docs/Util.html
index 2c47de3..5ba612a 100644
--- a/docs/Util.html
+++ b/docs/Util.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Class: Util
+ whatsapp-web.js 1.13.1 » Class: Util
@@ -15,7 +15,7 @@
diff --git a/docs/global.html b/docs/global.html
index 0ec5cf0..a2cf0a1 100644
--- a/docs/global.html
+++ b/docs/global.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Globals
+ whatsapp-web.js 1.13.1 » Globals
@@ -15,7 +15,7 @@
diff --git a/docs/index.html b/docs/index.html
index 2b24426..1f88490 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Home
+ whatsapp-web.js 1.13.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 becc19f..32649be 100644
--- a/docs/structures_Base.js.html
+++ b/docs/structures_Base.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Base.js
+ whatsapp-web.js 1.13.1 » Source: structures/Base.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html
index fdb6fc1..c6cca15 100644
--- a/docs/structures_BusinessContact.js.html
+++ b/docs/structures_BusinessContact.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/BusinessContact.js
+ whatsapp-web.js 1.13.1 » Source: structures/BusinessContact.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html
index 92743d2..d803b99 100644
--- a/docs/structures_Chat.js.html
+++ b/docs/structures_Chat.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Chat.js
+ whatsapp-web.js 1.13.1 » Source: structures/Chat.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html
index 30c490e..10b5d9d 100644
--- a/docs/structures_ClientInfo.js.html
+++ b/docs/structures_ClientInfo.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/ClientInfo.js
+ whatsapp-web.js 1.13.1 » Source: structures/ClientInfo.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html
index e4bca9b..7b795d1 100644
--- a/docs/structures_Contact.js.html
+++ b/docs/structures_Contact.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Contact.js
+ whatsapp-web.js 1.13.1 » Source: structures/Contact.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html
index 12c1784..596dc2c 100644
--- a/docs/structures_GroupChat.js.html
+++ b/docs/structures_GroupChat.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/GroupChat.js
+ whatsapp-web.js 1.13.1 » Source: structures/GroupChat.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html
index 7cd27da..7e47344 100644
--- a/docs/structures_GroupNotification.js.html
+++ b/docs/structures_GroupNotification.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/GroupNotification.js
+ whatsapp-web.js 1.13.1 » Source: structures/GroupNotification.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html
index 20ad42a..08fc750 100644
--- a/docs/structures_Label.js.html
+++ b/docs/structures_Label.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Label.js
+ whatsapp-web.js 1.13.1 » Source: structures/Label.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html
index e8d387c..8a5a1ce 100644
--- a/docs/structures_Location.js.html
+++ b/docs/structures_Location.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Location.js
+ whatsapp-web.js 1.13.1 » Source: structures/Location.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html
index 3adef21..30094ab 100644
--- a/docs/structures_Message.js.html
+++ b/docs/structures_Message.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Message.js
+ whatsapp-web.js 1.13.1 » Source: structures/Message.js
@@ -15,7 +15,7 @@
@@ -72,7 +72,7 @@ class Message extends Base {
* Indicates if the message has media available for download
* @type {boolean}
*/
- this.hasMedia = data.clientUrl || data.deprecatedMms3Url;
+ this.hasMedia = Boolean(data.mediaKey && data.directPath);
/**
* Message content
@@ -343,14 +343,20 @@ class Message extends Base {
return undefined;
}
- const mediaUrl = msg.clientUrl || msg.deprecatedMms3Url;
+ const decryptedMedia = await window.Store.DownloadManager.downloadAndDecrypt({
+ directPath: msg.directPath,
+ encFilehash: msg.encFilehash,
+ filehash: msg.filehash,
+ mediaKey: msg.mediaKey,
+ mediaKeyTimestamp: msg.mediaKeyTimestamp,
+ type: msg.type,
+ signal: (new AbortController).signal
+ });
- const buffer = await window.WWebJS.downloadBuffer(mediaUrl);
- const decrypted = await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype);
- const data = await window.WWebJS.readBlobAsync(decrypted._blob);
+ const data = window.WWebJS.arrayBufferToBase64(decryptedMedia);
return {
- data: data.split(',')[1],
+ data,
mimetype: msg.mimetype,
filename: msg.filename
};
diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html
index 1e45235..66b146f 100644
--- a/docs/structures_MessageMedia.js.html
+++ b/docs/structures_MessageMedia.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/MessageMedia.js
+ whatsapp-web.js 1.13.1 » Source: structures/MessageMedia.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html
index cb90fcf..c6c6757 100644
--- a/docs/structures_Order.js.html
+++ b/docs/structures_Order.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Order.js
+ whatsapp-web.js 1.13.1 » Source: structures/Order.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html
index d36a22d..f1fa410 100644
--- a/docs/structures_PrivateChat.js.html
+++ b/docs/structures_PrivateChat.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/PrivateChat.js
+ whatsapp-web.js 1.13.1 » Source: structures/PrivateChat.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html
index e11f0d0..588e7dc 100644
--- a/docs/structures_PrivateContact.js.html
+++ b/docs/structures_PrivateContact.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/PrivateContact.js
+ whatsapp-web.js 1.13.1 » Source: structures/PrivateContact.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html
index 6dada75..4cf3680 100644
--- a/docs/structures_Product.js.html
+++ b/docs/structures_Product.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/Product.js
+ whatsapp-web.js 1.13.1 » Source: structures/Product.js
@@ -15,7 +15,7 @@
diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html
index 353739d..5480949 100644
--- a/docs/structures_ProductMetadata.js.html
+++ b/docs/structures_ProductMetadata.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: structures/ProductMetadata.js
+ whatsapp-web.js 1.13.1 » Source: structures/ProductMetadata.js
@@ -15,7 +15,7 @@
diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html
index a4db26a..67b9853 100644
--- a/docs/util_Constants.js.html
+++ b/docs/util_Constants.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: util/Constants.js
+ whatsapp-web.js 1.13.1 » Source: util/Constants.js
@@ -15,7 +15,7 @@
diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html
index 365808e..536cf40 100644
--- a/docs/util_InterfaceController.js.html
+++ b/docs/util_InterfaceController.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: util/InterfaceController.js
+ whatsapp-web.js 1.13.1 » Source: util/InterfaceController.js
@@ -15,7 +15,7 @@
diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html
index baaba6a..9f352c5 100644
--- a/docs/util_Util.js.html
+++ b/docs/util_Util.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.13.0 » Source: util/Util.js
+ whatsapp-web.js 1.13.1 » Source: util/Util.js
@@ -15,7 +15,7 @@
diff --git a/package.json b/package.json
index be18269..b74ad1b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "whatsapp-web.js",
- "version": "1.13.0",
+ "version": "1.13.1",
"description": "Library for interacting with the WhatsApp Web API ",
"main": "./index.js",
"typings": "./index.d.ts",