whatsapp-web.js 1.31.0 → 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.31.0",
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",
@@ -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);