Open derodevil opened 3 years ago
same issue here
same issue, looking for solution
solution working here:
@efjcz thanks men. it's working
Confirm Working :) for convenience the lines to copy are from lines 30 to 86 of wapi.js
for (let idx in modules) {
if ((typeof modules[idx] === "object") && (modules[idx] !== null)) {
neededObjects.forEach((needObj) => {
if (!needObj.conditions || needObj.foundedModule)
return;
let neededModule = needObj.conditions(modules[idx]);
if (neededModule !== null) {
foundCount++;
needObj.foundedModule = neededModule;
}
});
if (foundCount == neededObjects.length) {
break;
}
}
}
let neededStore = neededObjects.find((needObj) => needObj.id === "Store");
window.Store = neededStore.foundedModule ? neededStore.foundedModule : {};
neededObjects.splice(neededObjects.indexOf(neededStore), 1);
neededObjects.forEach((needObj) => {
if (needObj.foundedModule) {
window.Store[needObj.id] = needObj.foundedModule;
}
});
window.Store.Chat.modelClass.prototype.sendMessage = function (e) {
window.Store.SendTextMsgToChat(this, ...arguments);
}
return window.Store;
}
if (typeof webpackJsonp === 'function') {
webpackJsonp([], {'parasite': (x, y, z) => getStore(z)}, ['parasite']);
} else {
let tag = new Date().getTime();
webpackChunkbuild.push([
["parasite" + tag],
{
},
function (o, e, t) {
let modules = [];
for (let idx in o.m) {
let module = o(idx);
modules.push(module);
}
getStore(modules);
}
]);
}
})();
}
'modelClass' of undefined
'modelClass' of undefined
There is another pullrequest that replaces the code block:
window.Store.Chat.modelClass.prototype.sendMessage = function (e) {
window.Store.SendTextMsgToChat(this, ...arguments);
}
for
window.Store.ChatClass.default.prototype.sendMessage = function (e) {
window.Store.SendTextMsgToChat(this, ...arguments);
}
Even so, I didn't manage to put the whole thing back to work.... =/
https://github.com/mukulhase/WebWhatsapp-Wrapper/blob/d05279ee6e214eeccb02d5cfe2037707d4fa6153/webwhatsapi/js/wapi.js#L73