diff --git a/docs/Base.html b/docs/Base.html
index 79b0904..6e3956d 100644
--- a/docs/Base.html
+++ b/docs/Base.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Base
+ whatsapp-web.js 1.2.5 » Class: Base
@@ -15,7 +15,7 @@
@@ -50,7 +50,7 @@
diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html
index ba64b00..2d0d866 100644
--- a/docs/BusinessContact.html
+++ b/docs/BusinessContact.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: BusinessContact
+ whatsapp-web.js 1.2.5 » Class: BusinessContact
@@ -15,7 +15,7 @@
@@ -227,7 +227,7 @@
diff --git a/docs/Chat.html b/docs/Chat.html
index f2f9369..0708664 100644
--- a/docs/Chat.html
+++ b/docs/Chat.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Chat
+ whatsapp-web.js 1.2.5 » Class: Chat
@@ -15,7 +15,7 @@
@@ -350,7 +350,7 @@
diff --git a/docs/Client.html b/docs/Client.html
index 7473c82..3958ce9 100644
--- a/docs/Client.html
+++ b/docs/Client.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Client
+ whatsapp-web.js 1.2.5 » Class: Client
@@ -15,7 +15,7 @@
@@ -957,7 +957,7 @@
diff --git a/docs/Client.js.html b/docs/Client.js.html
index c980915..a9cd88a 100644
--- a/docs/Client.js.html
+++ b/docs/Client.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: Client.js
+ whatsapp-web.js 1.2.5 » Source: Client.js
@@ -15,7 +15,7 @@
@@ -33,7 +33,7 @@
const EventEmitter = require('events');
const puppeteer = require('puppeteer');
-const moduleRaid = require('moduleraid/moduleraid');
+const moduleRaid = require('@pedroslopez/moduleraid/moduleraid');
const jsQR = require('jsqr');
const Util = require('./util/Util');
@@ -533,7 +533,7 @@ module.exports = Client;
diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html
index a39f235..fb11aaf 100644
--- a/docs/ClientInfo.html
+++ b/docs/ClientInfo.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: ClientInfo
+ whatsapp-web.js 1.2.5 » Class: ClientInfo
@@ -15,7 +15,7 @@
@@ -187,7 +187,7 @@
diff --git a/docs/Contact.html b/docs/Contact.html
index 262d75f..79e2f12 100644
--- a/docs/Contact.html
+++ b/docs/Contact.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Contact
+ whatsapp-web.js 1.2.5 » Class: Contact
@@ -15,7 +15,7 @@
@@ -196,7 +196,7 @@
diff --git a/docs/GroupChat.html b/docs/GroupChat.html
index 79616b9..078fecb 100644
--- a/docs/GroupChat.html
+++ b/docs/GroupChat.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: GroupChat
+ whatsapp-web.js 1.2.5 » Class: GroupChat
@@ -15,7 +15,7 @@
@@ -726,7 +726,7 @@
diff --git a/docs/GroupNotification.html b/docs/GroupNotification.html
index a1ba100..15ab875 100644
--- a/docs/GroupNotification.html
+++ b/docs/GroupNotification.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: GroupNotification
+ whatsapp-web.js 1.2.5 » Class: GroupNotification
@@ -15,7 +15,7 @@
@@ -233,7 +233,7 @@
diff --git a/docs/Location.html b/docs/Location.html
index 2ce418e..676563b 100644
--- a/docs/Location.html
+++ b/docs/Location.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Location
+ whatsapp-web.js 1.2.5 » Class: Location
@@ -15,7 +15,7 @@
@@ -149,7 +149,7 @@
diff --git a/docs/Message.html b/docs/Message.html
index 36f584c..d4119d1 100644
--- a/docs/Message.html
+++ b/docs/Message.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Message
+ whatsapp-web.js 1.2.5 » Class: Message
@@ -15,7 +15,7 @@
@@ -371,7 +371,7 @@
diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html
index efe4637..e6518da 100644
--- a/docs/MessageMedia.html
+++ b/docs/MessageMedia.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: MessageMedia
+ whatsapp-web.js 1.2.5 » Class: MessageMedia
@@ -15,7 +15,7 @@
@@ -152,7 +152,7 @@
diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html
index dfc2536..5df6953 100644
--- a/docs/PrivateChat.html
+++ b/docs/PrivateChat.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: PrivateChat
+ whatsapp-web.js 1.2.5 » Class: PrivateChat
@@ -15,7 +15,7 @@
@@ -378,7 +378,7 @@
diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html
index 20660f4..36bab57 100644
--- a/docs/PrivateContact.html
+++ b/docs/PrivateContact.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: PrivateContact
+ whatsapp-web.js 1.2.5 » Class: PrivateContact
@@ -15,7 +15,7 @@
@@ -220,7 +220,7 @@
diff --git a/docs/Util.html b/docs/Util.html
index 81855b5..4cb0381 100644
--- a/docs/Util.html
+++ b/docs/Util.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Class: Util
+ whatsapp-web.js 1.2.5 » Class: Util
@@ -15,7 +15,7 @@
@@ -50,7 +50,7 @@
diff --git a/docs/global.html b/docs/global.html
index 178bd36..60f808a 100644
--- a/docs/global.html
+++ b/docs/global.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Globals
+ whatsapp-web.js 1.2.5 » Globals
@@ -15,7 +15,7 @@
@@ -991,7 +991,7 @@
diff --git a/docs/index.html b/docs/index.html
index 3b92d77..b73c576 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Home
+ whatsapp-web.js 1.2.5 » Home
@@ -15,7 +15,7 @@
@@ -27,7 +27,7 @@
@@ -1815,7 +1815,7 @@ client.initialize();
diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html
index 36c00de..c1dbcaa 100644
--- a/docs/structures_Base.js.html
+++ b/docs/structures_Base.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/Base.js
+ whatsapp-web.js 1.2.5 » Source: structures/Base.js
@@ -15,7 +15,7 @@
@@ -60,7 +60,7 @@ module.exports = Base;
diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html
index 67967cf..ebac4ba 100644
--- a/docs/structures_BusinessContact.js.html
+++ b/docs/structures_BusinessContact.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/BusinessContact.js
+ whatsapp-web.js 1.2.5 » Source: structures/BusinessContact.js
@@ -15,7 +15,7 @@
@@ -59,7 +59,7 @@ module.exports = BusinessContact;
diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html
index 033c9c4..2ea997c 100644
--- a/docs/structures_Chat.js.html
+++ b/docs/structures_Chat.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/Chat.js
+ whatsapp-web.js 1.2.5 » Source: structures/Chat.js
@@ -15,7 +15,7 @@
@@ -215,7 +215,7 @@ module.exports = Chat;
diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html
index 4f3d4f9..23b8959 100644
--- a/docs/structures_ClientInfo.js.html
+++ b/docs/structures_ClientInfo.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/ClientInfo.js
+ whatsapp-web.js 1.2.5 » Source: structures/ClientInfo.js
@@ -15,7 +15,7 @@
@@ -89,7 +89,7 @@ module.exports = ClientInfo;
diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html
index 0578382..32a433b 100644
--- a/docs/structures_Contact.js.html
+++ b/docs/structures_Contact.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/Contact.js
+ whatsapp-web.js 1.2.5 » Source: structures/Contact.js
@@ -15,7 +15,7 @@
@@ -153,7 +153,7 @@ module.exports = Contact;
diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html
index 7d83ee1..4fec7b0 100644
--- a/docs/structures_GroupChat.js.html
+++ b/docs/structures_GroupChat.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/GroupChat.js
+ whatsapp-web.js 1.2.5 » Source: structures/GroupChat.js
@@ -15,7 +15,7 @@
@@ -209,7 +209,7 @@ module.exports = GroupChat;
diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html
index d88c591..563c2ab 100644
--- a/docs/structures_GroupNotification.js.html
+++ b/docs/structures_GroupNotification.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/GroupNotification.js
+ whatsapp-web.js 1.2.5 » Source: structures/GroupNotification.js
@@ -15,7 +15,7 @@
@@ -143,7 +143,7 @@ module.exports = GroupNotification;
diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html
index 2cf1bff..7dbb12a 100644
--- a/docs/structures_Location.js.html
+++ b/docs/structures_Location.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/Location.js
+ whatsapp-web.js 1.2.5 » Source: structures/Location.js
@@ -15,7 +15,7 @@
@@ -71,7 +71,7 @@ module.exports = Location;
diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html
index a7197ff..1acf19f 100644
--- a/docs/structures_Message.js.html
+++ b/docs/structures_Message.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/Message.js
+ whatsapp-web.js 1.2.5 » Source: structures/Message.js
@@ -15,7 +15,7 @@
@@ -217,12 +217,18 @@ class Message extends Base {
return undefined;
}
- const {data, mimetype, filename} = await this.client.pupPage.evaluate(async (msgId) => {
+ const result = await this.client.pupPage.evaluate(async (msgId) => {
const msg = window.Store.Msg.get(msgId);
if(msg.mediaData.mediaStage != 'RESOLVED') {
+ // try to resolve media
await msg.downloadMedia(true, 1);
}
+
+ if(msg.mediaData.mediaStage != 'RESOLVED') {
+ // media could not be downloaded
+ return undefined;
+ }
const buffer = await window.WWebJS.downloadBuffer(msg.clientUrl);
const decrypted = await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype);
@@ -236,7 +242,8 @@ class Message extends Base {
}, this.id._serialized);
- return new MessageMedia(mimetype, data, filename);
+ if(!result) return undefined;
+ return new MessageMedia(result.mimetype, result.data, result.filename);
}
/**
@@ -267,7 +274,7 @@ module.exports = Message;
diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html
index 4f019f7..cd17eee 100644
--- a/docs/structures_MessageMedia.js.html
+++ b/docs/structures_MessageMedia.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/MessageMedia.js
+ whatsapp-web.js 1.2.5 » Source: structures/MessageMedia.js
@@ -15,7 +15,7 @@
@@ -69,7 +69,7 @@ module.exports = MessageMedia;
diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html
index 121314d..ae091a4 100644
--- a/docs/structures_PrivateChat.js.html
+++ b/docs/structures_PrivateChat.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/PrivateChat.js
+ whatsapp-web.js 1.2.5 » Source: structures/PrivateChat.js
@@ -15,7 +15,7 @@
@@ -51,7 +51,7 @@ module.exports = PrivateChat;
diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html
index 8a25df2..088b7a7 100644
--- a/docs/structures_PrivateContact.js.html
+++ b/docs/structures_PrivateContact.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: structures/PrivateContact.js
+ whatsapp-web.js 1.2.5 » Source: structures/PrivateContact.js
@@ -15,7 +15,7 @@
@@ -51,7 +51,7 @@ module.exports = PrivateContact;
diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html
index d997a88..4d06b7f 100644
--- a/docs/util_Constants.js.html
+++ b/docs/util_Constants.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: util/Constants.js
+ whatsapp-web.js 1.2.5 » Source: util/Constants.js
@@ -15,7 +15,7 @@
@@ -166,7 +166,7 @@ exports.MessageAck = {
diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html
index a858160..3174264 100644
--- a/docs/util_Util.js.html
+++ b/docs/util_Util.js.html
@@ -4,7 +4,7 @@
- whatsapp-web.js 1.2.4 » Source: util/Util.js
+ whatsapp-web.js 1.2.5 » Source: util/Util.js
@@ -15,7 +15,7 @@
@@ -73,7 +73,7 @@ module.exports = Util;
diff --git a/package.json b/package.json
index 592baa8..5fc5249 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "whatsapp-web.js",
- "version": "1.2.4-post",
+ "version": "1.2.5",
"description": "Library for interacting with the WhatsApp Web API ",
"main": "./index.js",
"scripts": {