From f506c171c1f96cc0a0db101ea67e208ce4e69493 Mon Sep 17 00:00:00 2001 From: Wictor Nogueira <57378387+wictornogueira@users.noreply.github.com> Date: Mon, 31 May 2021 20:24:30 -0300 Subject: [PATCH] add extra option to MessageSendOptions (#600) Co-authored-by: Pedro S. Lopez --- index.d.ts | 2 ++ src/Client.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 5016ceb..fca2864 100644 --- a/index.d.ts +++ b/index.d.ts @@ -602,6 +602,8 @@ declare namespace WAWebJS { sendSeen?: boolean /** Media to be sent */ media?: MessageMedia + /** Extra options */ + extra?: any /** Sticker name, if sendMediaAsSticker is true */ stickerName?: string /** Sticker author, if sendMediaAsSticker is true */ diff --git a/src/Client.js b/src/Client.js index 05e3fbb..89ca39f 100644 --- a/src/Client.js +++ b/src/Client.js @@ -462,7 +462,8 @@ class Client extends EventEmitter { caption: options.caption, quotedMessageId: options.quotedMessageId, parseVCards: options.parseVCards === false ? false : true, - mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : [] + mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : [], + ...options.extra }; const sendSeen = typeof options.sendSeen === 'undefined' ? true : options.sendSeen;