@@ -3498,7 +3498,7 @@ limitations under the License.
- PollVote#selectedOptions
+ PollVote#parentMsgKey
@@ -4344,7 +4344,7 @@ limitations under the License.
diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html
index 05f34e3..1277180 100644
--- a/docs/structures_Base.js.html
+++ b/docs/structures_Base.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Base.js
+
whatsapp-web.js 1.33.0 » Source: structures/Base.js
@@ -15,7 +15,7 @@
@@ -60,7 +60,7 @@ module.exports = Base;
diff --git a/docs/structures_Broadcast.js.html b/docs/structures_Broadcast.js.html
index ea772e7..a491ef1 100644
--- a/docs/structures_Broadcast.js.html
+++ b/docs/structures_Broadcast.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Broadcast.js
+
whatsapp-web.js 1.33.0 » Source: structures/Broadcast.js
@@ -15,7 +15,7 @@
@@ -108,7 +108,7 @@ module.exports = Broadcast;
diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html
index d9a9c48..b057578 100644
--- a/docs/structures_BusinessContact.js.html
+++ b/docs/structures_BusinessContact.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/BusinessContact.js
+
whatsapp-web.js 1.33.0 » Source: structures/BusinessContact.js
@@ -15,7 +15,7 @@
@@ -59,7 +59,7 @@ module.exports = BusinessContact;
diff --git a/docs/structures_Buttons.js.html b/docs/structures_Buttons.js.html
index 26c66b9..16df495 100644
--- a/docs/structures_Buttons.js.html
+++ b/docs/structures_Buttons.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Buttons.js
+
whatsapp-web.js 1.33.0 » Source: structures/Buttons.js
@@ -15,7 +15,7 @@
@@ -120,7 +120,7 @@ module.exports = Buttons;
diff --git a/docs/structures_Call.js.html b/docs/structures_Call.js.html
index ca47f04..fa39ca0 100644
--- a/docs/structures_Call.js.html
+++ b/docs/structures_Call.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Call.js
+
whatsapp-web.js 1.33.0 » Source: structures/Call.js
@@ -15,7 +15,7 @@
@@ -114,7 +114,7 @@ module.exports = Call;
diff --git a/docs/structures_Channel.js.html b/docs/structures_Channel.js.html
index 448c267..0fa8205 100644
--- a/docs/structures_Channel.js.html
+++ b/docs/structures_Channel.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Channel.js
+
whatsapp-web.js 1.33.0 » Source: structures/Channel.js
@@ -15,7 +15,7 @@
@@ -421,7 +421,7 @@ module.exports = Channel;
diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html
index 51cbff4..ddf4c31 100644
--- a/docs/structures_Chat.js.html
+++ b/docs/structures_Chat.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Chat.js
+
whatsapp-web.js 1.33.0 » Source: structures/Chat.js
@@ -15,7 +15,7 @@
@@ -338,7 +338,7 @@ module.exports = Chat;
diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html
index fcb8384..20d5dd7 100644
--- a/docs/structures_ClientInfo.js.html
+++ b/docs/structures_ClientInfo.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/ClientInfo.js
+
whatsapp-web.js 1.33.0 » Source: structures/ClientInfo.js
@@ -15,7 +15,7 @@
@@ -109,7 +109,7 @@ module.exports = ClientInfo;
diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html
index 017bcde..8b3651e 100644
--- a/docs/structures_Contact.js.html
+++ b/docs/structures_Contact.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Contact.js
+
whatsapp-web.js 1.33.0 » Source: structures/Contact.js
@@ -15,7 +15,7 @@
@@ -247,7 +247,7 @@ module.exports = Contact;
diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html
index cd2e950..94144c4 100644
--- a/docs/structures_GroupChat.js.html
+++ b/docs/structures_GroupChat.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/GroupChat.js
+
whatsapp-web.js 1.33.0 » Source: structures/GroupChat.js
@@ -15,7 +15,7 @@
@@ -524,7 +524,7 @@ module.exports = GroupChat;
diff --git a/docs/structures_GroupNotification.js.html b/docs/structures_GroupNotification.js.html
index 7d2ed41..1771073 100644
--- a/docs/structures_GroupNotification.js.html
+++ b/docs/structures_GroupNotification.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/GroupNotification.js
+
whatsapp-web.js 1.33.0 » Source: structures/GroupNotification.js
@@ -15,7 +15,7 @@
@@ -143,7 +143,7 @@ module.exports = GroupNotification;
diff --git a/docs/structures_Label.js.html b/docs/structures_Label.js.html
index 3cea188..985cde9 100644
--- a/docs/structures_Label.js.html
+++ b/docs/structures_Label.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Label.js
+
whatsapp-web.js 1.33.0 » Source: structures/Label.js
@@ -15,7 +15,7 @@
@@ -88,7 +88,7 @@ module.exports = Label;
diff --git a/docs/structures_List.js.html b/docs/structures_List.js.html
index b3a425f..fb081c8 100644
--- a/docs/structures_List.js.html
+++ b/docs/structures_List.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/List.js
+
whatsapp-web.js 1.33.0 » Source: structures/List.js
@@ -15,7 +15,7 @@
@@ -118,7 +118,7 @@ module.exports = List;
diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html
index 5132127..d88da9e 100644
--- a/docs/structures_Location.js.html
+++ b/docs/structures_Location.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Location.js
+
whatsapp-web.js 1.33.0 » Source: structures/Location.js
@@ -15,7 +15,7 @@
@@ -100,7 +100,7 @@ module.exports = Location;
diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html
index 5ec3f2b..fd644c8 100644
--- a/docs/structures_Message.js.html
+++ b/docs/structures_Message.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Message.js
+
whatsapp-web.js 1.33.0 » Source: structures/Message.js
@@ -15,7 +15,7 @@
@@ -289,6 +289,14 @@ class Message extends Base {
this.latestEditMsgKey = data.latestEditMsgKey;
}
+ /**
+ * Protocol message key.
+ * Can be used to retrieve the ID of an original message that was revoked.
+ */
+ if (data.protocolMessageKey) {
+ this.protocolMessageKey = data.protocolMessageKey;
+ }
+
/**
* Links included in the message.
* @type {Array<{link: string, isSuspicious: boolean}>}
@@ -778,7 +786,7 @@ module.exports = Message;
diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html
index 2351d1f..6a5190f 100644
--- a/docs/structures_MessageMedia.js.html
+++ b/docs/structures_MessageMedia.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/MessageMedia.js
+
whatsapp-web.js 1.33.0 » Source: structures/MessageMedia.js
@@ -15,7 +15,7 @@
@@ -150,7 +150,7 @@ module.exports = MessageMedia;
diff --git a/docs/structures_Order.js.html b/docs/structures_Order.js.html
index 813dc8e..22ed75a 100644
--- a/docs/structures_Order.js.html
+++ b/docs/structures_Order.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Order.js
+
whatsapp-web.js 1.33.0 » Source: structures/Order.js
@@ -15,7 +15,7 @@
@@ -90,7 +90,7 @@ module.exports = Order;
diff --git a/docs/structures_Payment.js.html b/docs/structures_Payment.js.html
index f7b7573..ccc30b2 100644
--- a/docs/structures_Payment.js.html
+++ b/docs/structures_Payment.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Payment.js
+
whatsapp-web.js 1.33.0 » Source: structures/Payment.js
@@ -15,7 +15,7 @@
@@ -118,7 +118,7 @@ module.exports = Payment;
diff --git a/docs/structures_Poll.js.html b/docs/structures_Poll.js.html
index 498f123..508064a 100644
--- a/docs/structures_Poll.js.html
+++ b/docs/structures_Poll.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Poll.js
+
whatsapp-web.js 1.33.0 » Source: structures/Poll.js
@@ -15,7 +15,7 @@
@@ -83,7 +83,7 @@ module.exports = Poll;
diff --git a/docs/structures_PollVote.js.html b/docs/structures_PollVote.js.html
index eec2882..7fbe364 100644
--- a/docs/structures_PollVote.js.html
+++ b/docs/structures_PollVote.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/PollVote.js
+
whatsapp-web.js 1.33.0 » Source: structures/PollVote.js
@@ -15,7 +15,7 @@
@@ -65,14 +65,22 @@ class PollVote extends Base {
* may occur when they deselected all poll options
* @type {SelectedPollOption[]}
*/
- this.selectedOptions =
- data.selectedOptionLocalIds.length > 0
- ? data.selectedOptionLocalIds.map((e) => ({
+ if (data.selectedOptionLocalIds.length > 0) {
+ if(data.parentMessage) { // temporary failsafe
+ this.selectedOptions = data.selectedOptionLocalIds.map((e) => ({
name: data.parentMessage.pollOptions.find((x) => x.localId === e).name,
localId: e
- }))
- : [];
-
+ }));
+ } else {
+ this.selectedOptions = data.selectedOptionLocalIds.map((e) => ({
+ name: undefined,
+ localId: e
+ }));
+ }
+ } else {
+ this.selectedOptions = [];
+ }
+
/**
* Timestamp the option was selected or deselected at
* @type {number}
@@ -85,6 +93,12 @@ class PollVote extends Base {
*/
this.parentMessage = new Message(this.client, data.parentMessage);
+ /**
+ * The poll creation message id
+ * @type {Object}
+ */
+ this.parentMsgKey = data.parentMsgKey;
+
return super._patch(data);
}
}
@@ -100,7 +114,7 @@ module.exports = PollVote;
diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html
index decfa45..dbba73a 100644
--- a/docs/structures_PrivateChat.js.html
+++ b/docs/structures_PrivateChat.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/PrivateChat.js
+
whatsapp-web.js 1.33.0 » 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 57f3f8d..53b5e97 100644
--- a/docs/structures_PrivateContact.js.html
+++ b/docs/structures_PrivateContact.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/PrivateContact.js
+
whatsapp-web.js 1.33.0 » Source: structures/PrivateContact.js
@@ -15,7 +15,7 @@
@@ -51,7 +51,7 @@ module.exports = PrivateContact;
diff --git a/docs/structures_Product.js.html b/docs/structures_Product.js.html
index 612192e..c7e1db9 100644
--- a/docs/structures_Product.js.html
+++ b/docs/structures_Product.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Product.js
+
whatsapp-web.js 1.33.0 » Source: structures/Product.js
@@ -15,7 +15,7 @@
@@ -106,7 +106,7 @@ module.exports = Product;
diff --git a/docs/structures_ProductMetadata.js.html b/docs/structures_ProductMetadata.js.html
index e7f8d3e..34b69ca 100644
--- a/docs/structures_ProductMetadata.js.html
+++ b/docs/structures_ProductMetadata.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/ProductMetadata.js
+
whatsapp-web.js 1.33.0 » Source: structures/ProductMetadata.js
@@ -15,7 +15,7 @@
@@ -63,7 +63,7 @@ module.exports = ProductMetadata;
diff --git a/docs/structures_Reaction.js.html b/docs/structures_Reaction.js.html
index 8d34bfe..8cddda5 100644
--- a/docs/structures_Reaction.js.html
+++ b/docs/structures_Reaction.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/Reaction.js
+
whatsapp-web.js 1.33.0 » Source: structures/Reaction.js
@@ -15,7 +15,7 @@
@@ -107,7 +107,7 @@ module.exports = Reaction;
diff --git a/docs/structures_ScheduledEvent.js.html b/docs/structures_ScheduledEvent.js.html
index e9d462e..1dcbb27 100644
--- a/docs/structures_ScheduledEvent.js.html
+++ b/docs/structures_ScheduledEvent.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: structures/ScheduledEvent.js
+
whatsapp-web.js 1.33.0 » Source: structures/ScheduledEvent.js
@@ -15,7 +15,7 @@
@@ -110,7 +110,7 @@ module.exports = ScheduledEvent;
diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html
index 96cd312..a07827f 100644
--- a/docs/util_Constants.js.html
+++ b/docs/util_Constants.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: util/Constants.js
+
whatsapp-web.js 1.33.0 » Source: util/Constants.js
@@ -15,7 +15,7 @@
@@ -222,7 +222,7 @@ exports.MessageAck = {
diff --git a/docs/util_Injected_LegacyStore.js.html b/docs/util_Injected_LegacyStore.js.html
index c844df8..4ab598e 100644
--- a/docs/util_Injected_LegacyStore.js.html
+++ b/docs/util_Injected_LegacyStore.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: util/Injected/LegacyStore.js
+
whatsapp-web.js 1.33.0 » Source: util/Injected/LegacyStore.js
@@ -15,7 +15,7 @@
@@ -184,7 +184,7 @@ exports.ExposeLegacyStore = () => {
diff --git a/docs/util_Injected_Store.js.html b/docs/util_Injected_Store.js.html
index efecf46..65bba63 100644
--- a/docs/util_Injected_Store.js.html
+++ b/docs/util_Injected_Store.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: util/Injected/Store.js
+
whatsapp-web.js 1.33.0 » Source: util/Injected/Store.js
@@ -15,7 +15,7 @@
@@ -127,6 +127,7 @@ exports.ExposeStore = () => {
window.Store.DeviceList = window.require('WAWebApiDeviceList');
window.Store.HistorySync = window.require('WAWebSendNonMessageDataRequest');
window.Store.AddonReactionTable = window.require('WAWebAddonReactionTableMode').reactionTableMode;
+ window.Store.AddonPollVoteTable = window.require('WAWebAddonPollVoteTableMode').pollVoteTableMode;
window.Store.PinnedMsgUtils = window.require('WAWebPinInChatSchema');
window.Store.ChatGetters = window.require('WAWebChatGetters');
window.Store.PinnedMsgUtils = window.require('WAWebSendPinMessageAction');
@@ -261,7 +262,7 @@ exports.ExposeStore = () => {
diff --git a/docs/util_InterfaceController.js.html b/docs/util_InterfaceController.js.html
index e97ffb5..3584e37 100644
--- a/docs/util_InterfaceController.js.html
+++ b/docs/util_InterfaceController.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: util/InterfaceController.js
+
whatsapp-web.js 1.33.0 » Source: util/InterfaceController.js
@@ -15,7 +15,7 @@
@@ -165,7 +165,7 @@ module.exports = InterfaceController;
diff --git a/docs/util_Puppeteer.js.html b/docs/util_Puppeteer.js.html
index 47f7aba..88bd9fe 100644
--- a/docs/util_Puppeteer.js.html
+++ b/docs/util_Puppeteer.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: util/Puppeteer.js
+
whatsapp-web.js 1.33.0 » Source: util/Puppeteer.js
@@ -15,7 +15,7 @@
@@ -62,7 +62,7 @@ module.exports = {exposeFunctionIfAbsent};
diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html
index 1c8eb8c..4734519 100644
--- a/docs/util_Util.js.html
+++ b/docs/util_Util.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: util/Util.js
+
whatsapp-web.js 1.33.0 » Source: util/Util.js
@@ -15,7 +15,7 @@
@@ -225,7 +225,7 @@ module.exports = Util;
diff --git a/docs/webCache_LocalWebCache.js.html b/docs/webCache_LocalWebCache.js.html
index 6fa05c8..a1cacc4 100644
--- a/docs/webCache_LocalWebCache.js.html
+++ b/docs/webCache_LocalWebCache.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: webCache/LocalWebCache.js
+
whatsapp-web.js 1.33.0 » Source: webCache/LocalWebCache.js
@@ -15,7 +15,7 @@
@@ -79,7 +79,7 @@ module.exports = LocalWebCache;
diff --git a/docs/webCache_RemoteWebCache.js.html b/docs/webCache_RemoteWebCache.js.html
index ab98899..a9ef14a 100644
--- a/docs/webCache_RemoteWebCache.js.html
+++ b/docs/webCache_RemoteWebCache.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: webCache/RemoteWebCache.js
+
whatsapp-web.js 1.33.0 » Source: webCache/RemoteWebCache.js
@@ -15,7 +15,7 @@
@@ -78,7 +78,7 @@ module.exports = RemoteWebCache;
diff --git a/docs/webCache_WebCache.js.html b/docs/webCache_WebCache.js.html
index c17f465..eb9e8ae 100644
--- a/docs/webCache_WebCache.js.html
+++ b/docs/webCache_WebCache.js.html
@@ -4,7 +4,7 @@
-
whatsapp-web.js 1.32.0 » Source: webCache/WebCache.js
+
whatsapp-web.js 1.33.0 » Source: webCache/WebCache.js
@@ -15,7 +15,7 @@
@@ -52,7 +52,7 @@ module.exports = {