wa-js icon indicating copy to clipboard operation
wa-js copied to clipboard

The delay is not working

Open RodrigoSerrasqueiro opened this issue 1 year ago • 0 comments

WA-JS Version

1.5.577

WhatsApp Version

2.3000.1017756636

Browser Version

Chrome 130.0.6723.70 (Versão oficial) 64 bits

Operation System

Windows 11 23H2

Steps to reproduce

inject wppconnect-wa.js script into Whatsapp Web page

After injecting the script into the page, the WPP global variable must be available in the window object and accessible through the console.

Access Whatsapp Web

Access Whatsapp Web, select a chat and open the developer tools

Run the code below in the browser console

remember to replace "" with a base64 string from an audio file in .ogg format. I recommend downloading a file directly from Whatsapp.

WPP.chat.sendFileMessage( WPP.chat.getActiveChat().id, 'data:audio/mp3;base64,<a long base64 file...>', { type: 'audio', delay: 10000 } );

What is expected?

When sending audio messages, the person receiving the message must appear "recording audio" during the configured delay time and only then can the message be sent.

What is actually happening?

The message is being sent at the same time.

Any additional comments?

In the case of sending text messages, the delay is working normally. It even appears to the user "typing..."

WPP.chat.sendTextMessage(WPP.chat.getActiveChat().id, 'Delay with typing', { delay: 4000 })

RodrigoSerrasqueiro avatar Oct 29 '24 15:10 RodrigoSerrasqueiro