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:
parent
c8c2f09f20
commit
8ff5bceca0
1 changed files with 16 additions and 4 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue