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.03k stars 796 forks source link

ModelCreateError: ProfilePicThumb↵ at t.n #686

Open tetradox opened 5 years ago

tetradox commented 5 years ago

@brunosoaresds @lfdelphino @mukulhase @bobaoapae @Theblood

when I query a number that is not registered.

query code :

window.Store.ProfilePicThumb.find('0292932323223@c.us')

I need to get __x_imgFull

Error :

"ModelCreateError: ProfilePicThumb at t.n (https://web.whatsapp.com/app.f2d64e26d366144085e4.js:2:1504804) at new t (https://web.whatsapp.com/app.f2d64e26d366144085e4.js:2:362660) at https://web.whatsapp.com/app3.7f67e768cb37abf0919c.js:2:160547 at L (https://web.whatsapp.com/app.f2d64e26d366144085e4.js:2:7038) at MutationObserver.R (https://web.whatsapp.com/app.f2d64e26d366144085e4.js:2:6543)"

Note: i don't know how it works https://github.com/LoranKloeze/WhatsAllApp

hedcet commented 4 years ago

you need to edit Store.ProfilePicThumb.find as below

profilePicThumb: window.WAPI._serializeProfilePicThumb(obj.profilePicThumb ? obj.profilePicThumb : await window.Store.ProfilePicThumb.find(new window.Store.UserConstructor(id._serialized, { intentionallyUsePrivateConstructor: true })))