feat: send photo/video as a view once message (#2317)

* added isViewOnce property

* docs updated

* added usage example

* fix: ESLint
This commit is contained in:
alechkos 2023-07-31 12:53:35 +03:00 • committed by GitHub
commit 8ff5bceca0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View file

@ -127,6 +127,7 @@ exports.LoadUtils = () => {
attOptions.caption = options.caption;
}
content = options.sendMediaAsSticker ? undefined : attOptions.preview;
attOptions.isViewOnce = options.isViewOnce;
delete options.attachment;
delete options.sendMediaAsSticker;
@ -232,8 +233,8 @@ exports.LoadUtils = () => {
}
let listOptions = {};
if(options.list){
if(window.Store.Conn.platform === 'smba' || window.Store.Conn.platform === 'smbi'){
if (options.list) {
if (window.Store.Conn.platform === 'smba' || window.Store.Conn.platform === 'smbi') {
throw '[LT01] Whatsapp business can\'t send this yet';
}
listOptions = {