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 <pedroslopez@me.com>
This commit is contained in:
Humberto Zambrano 2023-05-29 01:38:59 -05:00 • committed by GitHub
commit 3dd4463478
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;