From 3dd4463478abb561efd83764abfbd88624dcf774 Mon Sep 17 00:00:00 2001 From: Humberto Zambrano Date: Mon, 29 May 2023 01:38:59 -0500 Subject: [PATCH] Fix caption in attached document sending messages (#2226) * Caption for attached document * Update Injected.js --------- Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com> Co-authored-by: Pedro S. Lopez --- src/util/Injected.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 76d134a..3f5aa96 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -119,7 +119,10 @@ exports.LoadUtils = () => { forceDocument: options.sendMediaAsDocument, forceGif: options.sendVideoAsGif }); - + + if (options.caption){ + attOptions.caption = options.caption; + } content = options.sendMediaAsSticker ? undefined : attOptions.preview; delete options.attachment;