feat: link previews

After this commit, previews for links will be enabled by default. To disable it, use linkPreview: false as an option when sending the message.

close #98
This commit is contained in:
Pedro Lopez
2020-04-11 19:45:06 -04:00
parent 2b3c3e971a
commit 044f62216b
2 changed files with 13 additions and 1 deletions

View File

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