Skip to content

Commit

Permalink
Fix to getProfilePics
Browse files Browse the repository at this point in the history
Trying to get a profile picture would never return `done` when the contact is not on your contacts list.
This happens because the promise `window.Store.ProfilePicThumb.find(id)` rejects it if not found.
  • Loading branch information
lfdelphino authored Sep 16, 2018
1 parent b97df17 commit 67e022e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions webwhatsapi/js/wapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,9 @@ window.WAPI.getProfilePicSmallFromId = function(id, done) {
} else {
done(false);
}
})
}, function(e) {
done(false);
})
};

window.WAPI.getProfilePicFromId = function(id, done) {
Expand All @@ -928,7 +930,9 @@ window.WAPI.getProfilePicFromId = function(id, done) {
} else {
done(false);
}
})
}, function(e) {
done(false);
})
};

window.WAPI.downloadFileWithCredentials = function (url, done) {
Expand Down Expand Up @@ -1292,4 +1296,4 @@ window.WAPI.removeParticipantGroup = function(idGroup, idParticipant, done){
done(false); return false;
})

}
}

0 comments on commit 67e022e

Please sign in to comment.