feat: send audio as voice note

This adds the 'sendAudioAsVoice' option for messages

close #160
This commit is contained in:
Pedro Lopez
2020-04-14 23:18:08 -04:00
parent 59ee68b227
commit 686c99f0c7
2 changed files with 7 additions and 2 deletions

View File

@@ -382,6 +382,7 @@ class Client extends EventEmitter {
async sendMessage(chatId, content, options = {}) {
let internalOptions = {
linkPreview: options.linkPreview === false ? undefined : true,
sendAudioAsVoice: options.sendAudioAsVoice,
caption: options.caption,
quotedMessageId: options.quotedMessageId,
mentionedJidList: Array.isArray(options.mentions) ? options.mentions.map(contact => contact.id._serialized) : []