whatsapp-web.js 1.29.0 → 1.30.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
@@ -1261,7 +1261,7 @@ declare namespace WAWebJS {
1261
1261
  /** Sticker categories, if sendMediaAsSticker is true */
1262
1262
  stickerCategories?: string[],
1263
1263
  /** Should the bot send a quoted message without the quoted message if it fails to get the quote?
1264
- * @default false (disabled) */
1264
+ * @default true (enabled) */
1265
1265
  ignoreQuoteErrors?: boolean
1266
1266
  }
1267
1267
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-web.js",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "Library for interacting with the WhatsApp Web API ",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
package/src/Client.js CHANGED
@@ -851,6 +851,7 @@ class Client extends EventEmitter {
851
851
  * @property {string} [stickerAuthor=undefined] - Sets the author of the sticker, (if sendMediaAsSticker is true).
852
852
  * @property {string} [stickerName=undefined] - Sets the name of the sticker, (if sendMediaAsSticker is true).
853
853
  * @property {string[]} [stickerCategories=undefined] - Sets the categories of the sticker, (if sendMediaAsSticker is true). Provide emoji char array, can be null.
854
+ * @property {boolean} [ignoreQuoteErrors = true] - Should the bot send a quoted message without the quoted message if it fails to get the quote?
854
855
  * @property {MessageMedia} [media] - Media to be sent
855
856
  * @property {any} [extra] - Extra options
856
857
  */
@@ -899,6 +900,7 @@ class Client extends EventEmitter {
899
900
  mentionedJidList: options.mentions || [],
900
901
  groupMentions: options.groupMentions,
901
902
  invokedBotWid: options.invokedBotWid,
903
+ ignoreQuoteErrors: options.ignoreQuoteErrors !== false,
902
904
  extraOptions: options.extra
903
905
  };
904
906
 
@@ -48,7 +48,7 @@ exports.LoadUtils = () => {
48
48
  let quotedMessage = window.Store.Msg.get(options.quotedMessageId);
49
49
  !quotedMessage && (quotedMessage = (await window.Store.Msg.getMessagesById([options.quotedMessageId]))?.messages?.[0]);
50
50
 
51
- if (quotedMessage['messages'].length == 1) {
51
+ if (quotedMessage['messages']?.length == 1) {
52
52
  quotedMessage = quotedMessage['messages'][0];
53
53
 
54
54
  const canReply = window.Store.ReplyUtils
@@ -550,7 +550,7 @@ exports.LoadUtils = () => {
550
550
  model.isGroup = true;
551
551
  const chatWid = window.Store.WidFactory.createWid(chat.id._serialized);
552
552
  await window.Store.GroupMetadata.update(chatWid);
553
- model.groupMetadata.participants._models
553
+ chat.groupMetadata.participants._models
554
554
  .filter(x => x.id._serialized.endsWith('@lid'))
555
555
  .forEach(x => { x.id = x.contact.phoneNumber; });
556
556
  model.groupMetadata = chat.groupMetadata.serialize();