diff --git a/index.d.ts b/index.d.ts index bc7d692..2a2c30a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -440,7 +440,7 @@ declare namespace WAWebJS { /** User agent to use in puppeteer. * @default 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36' */ userAgent?: string - /** Ffmpeg path to use when formating videos to webp while sending stickers + /** Ffmpeg path to use when formatting videos to webp while sending stickers * @default 'ffmpeg' */ ffmpegPath?: string, /** Object with proxy autentication requirements @default: undefined */ diff --git a/src/Client.js b/src/Client.js index a25af4d..4705567 100644 --- a/src/Client.js +++ b/src/Client.js @@ -30,7 +30,7 @@ const NoAuth = require('./authStrategies/NoAuth'); * @param {number} options.takeoverOnConflict - If another whatsapp web session is detected (another browser), take over the session in the current browser * @param {number} options.takeoverTimeoutMs - How much time to wait before taking over the session * @param {string} options.userAgent - User agent to use in puppeteer - * @param {string} options.ffmpegPath - Ffmpeg path to use when formating videos to webp while sending stickers + * @param {string} options.ffmpegPath - Ffmpeg path to use when formatting videos to webp while sending stickers * @param {boolean} options.bypassCSP - Sets bypassing of page's Content-Security-Policy. * @param {object} options.proxyAuthentication - Proxy Authentication object. * @@ -892,7 +892,7 @@ class Client extends EventEmitter { if (sendSeen) { - window.WWebJS.sendSeen(chatId); + await window.WWebJS.sendSeen(chatId); } const msg = await window.WWebJS.sendMessage(chat, message, options, sendSeen); diff --git a/src/util/Injected.js b/src/util/Injected.js index f411058..27b48e4 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -171,9 +171,7 @@ exports.LoadUtils = () => { forceGif: options.sendVideoAsGif }); - if (options.caption){ - attOptions.caption = options.caption; - } + attOptions.caption = options.caption; content = options.sendMediaAsSticker ? undefined : attOptions.preview; attOptions.isViewOnce = options.isViewOnce;