Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix window.Store.ProfilePic.profilePicFind is not a function error #3001

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,9 @@ class Client extends EventEmitter {
const profilePic = await this.pupPage.evaluate(async contactId => {
try {
const chatWid = window.Store.WidFactory.createWid(contactId);
return await window.Store.ProfilePic.profilePicFind(chatWid);
return window.WWebJS.compareWwebVersions(window.Debug.VERSION, '<', '2.3000.0')
? await window.Store.ProfilePic.profilePicFind(chatWid)
: await window.Store.ProfilePic.requestProfilePicFromServer(chatWid);
} catch (err) {
if(err.name === 'ServerStatusCodeError') return undefined;
throw err;
Expand Down