I tried wapi.js and found window.WAPI.sendImage has not worked again.
try #809
I also have problem.
It returns an error on console saying :
Error: Evaluation failed: TypeError: Cannot read property 'match' of undefined
at new e (https://web.whatsapp.com/app.389d6565f1dd26f59e83.js:2:3507877)
The error occur here: var idUser = new window.Store.UserConstructor(chatid, { intentionallyUsePrivateConstructor: true });
try #809
It doesn't work...
After WhatsApp version 0.4.930 update, the sendImage is not working. It seems that they remove the Store.MediaCollection.
PÂ {_flags: 6, _value: TypeError: Store.MediaCollection is not a constructor
at <anonymous>:1221:14
at oe (https:/…, _onRejected: undefined, _context: undefined, _onFulfilled: ƒ, …}
I've got a solution... You need to change this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processFiles !== undefined) ? module.default : null },
to this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },
And then you need to change this code too
mc.processFiles([mediaBlob], chat, 1).then(() => {
var media = mc.models[0];
media.sendToChat(chat, { caption: caption });
if (done !== undefined) done(true);
});
to this code
mc.processAttachments([{file: mediaBlob}, 1], chat, 1).then(() => {
let media = mc.models[0];
media.sendToChat(chat, {caption:caption});
if (done !== undefined) done(true);
});
I've got a solution... You need to change this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processFiles !== undefined) ? module.default : null },to this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },And then you need to change this code too
mc.processFiles([mediaBlob], chat, 1).then(() => { var media = mc.models[0]; media.sendToChat(chat, { caption: caption }); if (done !== undefined) done(true); });to this code
mc.processAttachments([{file: mediaBlob}, 1], chat, 1).then(() => { let media = mc.models[0]; media.sendToChat(chat, {caption:caption}); if (done !== undefined) done(true); });
What version of your WhatsApp Web? On 0.4.930 still doesn't work.
I've got a solution... You need to change this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processFiles !== undefined) ? module.default : null },to this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },And then you need to change this code too
mc.processFiles([mediaBlob], chat, 1).then(() => { var media = mc.models[0]; media.sendToChat(chat, { caption: caption }); if (done !== undefined) done(true); });to this code
mc.processAttachments([{file: mediaBlob}, 1], chat, 1).then(() => { let media = mc.models[0]; media.sendToChat(chat, {caption:caption}); if (done !== undefined) done(true); });What version of your WhatsApp Web? On 0.4.930 still doesn't work.
Have you done with this one? #810
I've got a solution... You need to change this code
```
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processFiles !== undefined) ? module.default : null },to this code ``` { id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },And then you need to change this code too
```
mc.processFiles([mediaBlob], chat, 1).then(() => {
var media = mc.models[0];
media.sendToChat(chat, { caption: caption });
if (done !== undefined) done(true);
});to this code ``` mc.processAttachments([{file: mediaBlob}, 1], chat, 1).then(() => { let media = mc.models[0]; media.sendToChat(chat, {caption:caption}); if (done !== undefined) done(true); });What version of your WhatsApp Web? On 0.4.930 still doesn't work.
Have you done with this one? #810
Yes.
I've got a solution... You need to change this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processFiles !== undefined) ? module.default : null },to this code
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },And then you need to change this code too
mc.processFiles([mediaBlob], chat, 1).then(() => { var media = mc.models[0]; media.sendToChat(chat, { caption: caption }); if (done !== undefined) done(true); });to this code
mc.processAttachments([{file: mediaBlob}, 1], chat, 1).then(() => { let media = mc.models[0]; media.sendToChat(chat, {caption:caption}); if (done !== undefined) done(true); });
Worked now, thanks for the answer!!
Worked for me!! Tks
Most helpful comment
I've got a solution... You need to change this code
to this code
And then you need to change this code too
to this code