mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.02k stars 796 forks source link

window.WAPI.sendImage is not working in chrome after chrome and whatsApp update #1184

Closed rajeshshettysrs closed 8 months ago

rajeshshettysrs commented 9 months ago

pdf,Excel,image attachment using window.WAPI.sendImage function is not working in chrome after chrome and whatsApp update, Getting error as Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'isNewsletter') at t.getMaxNumberSelectableMedia (app.f8ceec360734d3a1abb3.js:51:662539) at app.f8ceec360734d3a1abb3.js:96:851568 at Generator.next () at t (vendor1~app.7f14216f970118f62a35.js:2:66483) at s (vendor1~app.7f14216f970118f62a35.js:2:66694) at vendor1~app.7f14216f970118f62a35.js:2:66753 at new Promise () at vendor1~app.7f14216f970118f62a35.js:2:66634 at M.processAttachments (app.f8ceec360734d3a1abb3.js:96:852098) at eval (eval at executeScript (web.whatsapp.com/:369:16), :1582:16) Please help me in resolving above issue image

felipemonteiro44 commented 9 months ago

Managed to solve? I have the same problem

felipemonteiro44 commented 9 months ago

I managed to solve it here by changing mediaCollection.processFiles([{ file: audioFile }], chat, 1) to mediaCollection.processFiles([{ file: audioFile }], 1, chat)

processFiles or processAttachments

iaron commented 9 months ago

I managed to solve it here by changing mediaCollection.processFiles([{ file: audioFile }], chat, 1) to mediaCollection.processFiles([{ file: audioFile }], 1, chat)

processFiles or processAttachments

worked here, thanks!

vitor-nogueira-dev commented 9 months ago

I managed to solve it here by changing mediaCollection.processFiles([{ file: audioFile }], chat, 1) to mediaCollection.processFiles([{ file: audioFile }], 1, chat)

processFiles or processAttachments

Very good, thank you !! 🎉

Fr4ncisTaylor commented 8 months ago

can you send me your wapi.js to read this?