open-wa / wa-automate-nodejs

💬 🤖 The most reliable tool for chatbots with advanced features. Be sure to 🌟 this repository for updates!

Home Page:https://docs.openwa.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sendPtt and sendAudio problem with crash

GladistonXD opened this issue · comments

Are you using the latest version of the library?

  • I have checked and am using the latest version of the library.

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Tested and experienced on both

Mode

My own code

Current Behavior

When you sent more than one audio in the chat, WhatsApp web crashes and no longer sends any messages, I found a solution by disabling a parameter from 'waitForId' true to false.

    sendPtt(to, file, quotedMsgId) {
        return __awaiter(this, void 0, void 0, function* () {
            return this.sendImage(to, file, 'ptt.ogg', '', quotedMsgId ? quotedMsgId : null, false, true);
        });
    }

Expected Behavior

Find the id and send the audio.

Steps To Reproduce

I send the audio, receive the audio, send another audio and the web crashes and doesn't send anything else.

create() code OR full CLI command + CONFIG

No response

DEBUG INFO

Error [TypeError]: Cannot read properties of undefined (reading 'id')

Environment

- OS: Windows 10
- Node: 20.11.1
- npm: 8.0.0

Screenshots/Logs

No response

Anything else?

No response

please restart and try again