Skip to content

Commit

Permalink
add extra option to MessageSendOptions (pedroslopez#600)
Browse files Browse the repository at this point in the history
Co-authored-by: Pedro S. Lopez <pslamoros@hotmail.com>
  • Loading branch information
wictornogueira and pedroslopez authored May 31, 2021
1 parent 64e2cc4 commit f506c17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f506c17

Please sign in to comment.