whatsapp-web.js 1.30.1-alpha.3 → 1.31.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -160,7 +160,7 @@ declare namespace WAWebJS {
160
160
  * @param showNotification - Show notification to pair on phone number
161
161
  * @returns {Promise<string>} - Returns a pairing code in format "ABCDEFGH"
162
162
  */
163
- requestPairingCode(phoneNumber: string, showNotification = true): Promise<string>
163
+ requestPairingCode(phoneNumber: string, showNotification?: boolean): Promise<string>
164
164
 
165
165
  /** Force reset of connection state for the client */
166
166
  resetState(): Promise<void>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-web.js",
3
- "version": "1.30.1-alpha.3",
3
+ "version": "1.31.1-alpha.0",
4
4
  "description": "Library for interacting with the WhatsApp Web API ",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "homepage": "https://wwebjs.dev/",
31
31
  "dependencies": {
32
32
  "@pedroslopez/moduleraid": "^5.0.2",
33
- "fluent-ffmpeg": "2.1.2",
33
+ "fluent-ffmpeg": "2.1.3",
34
34
  "mime": "^3.0.0",
35
35
  "node-fetch": "^2.6.9",
36
36
  "node-webpmux": "3.1.7",
@@ -285,7 +285,7 @@ class Message extends Base {
285
285
  this.allowMultipleAnswers = Boolean(!data.pollSelectableOptionsCount);
286
286
  this.pollInvalidated = data.pollInvalidated;
287
287
  this.isSentCagPollCreation = data.isSentCagPollCreation;
288
- this.messageSecret = Object.keys(data.messageSecret).map((key) => data.messageSecret[key]);
288
+ this.messageSecret = data.messageSecret ? Object.keys(data.messageSecret).map((key) => data.messageSecret[key]) : [];
289
289
  }
290
290
 
291
291
  return super._patch(data);
@@ -302,6 +302,9 @@ exports.LoadUtils = () => {
302
302
  }
303
303
 
304
304
  await window.Store.SendMessage.addAndSendMsgToChat(chat, message);
305
+ await window.Store.HistorySync.sendPeerDataOperationRequest(3, {
306
+ chatId: chat.id
307
+ });
305
308
  return window.Store.Msg.get(newMsgKey._serialized);
306
309
  };
307
310