Skip to content

Commit

Permalink
fix: Fixed "sender" field in message return
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Feb 26, 2021
1 parent a48a2f5 commit ca5f6ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/lib/wapi/serializers/serialize-contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with WPPConnect. If not, see <https://www.gnu.org/licenses/>.
*/

export const _serializeContactObj = async (obj) => {
export const _serializeContactObj = (obj) => {
if (obj == undefined) {
return null;
}

let profile = await WAPI._profilePicfunc(obj.id._serialized);
let profile = WAPI._profilePicfunc(obj.id._serialized);

if (
!obj.profilePicThumb &&
Expand Down
16 changes: 8 additions & 8 deletions src/lib/wapi/serializers/serialize-profilePic.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with WPPConnect. If not, see <https://www.gnu.org/licenses/>.
*/

export const _profilePicfunc = async (id) => {
return await Store.ProfilePic.find(id)
.then((r) => {
return WAPI._serializeProfilePicThumb(r);
})
.catch(() => {
return null;
});
export const _profilePicfunc = (id) => {
const pic = Store.ProfilePic.get(id);

if (pic) {
return WAPI._serializeProfilePicThumb(pic);
}

return null;
};

0 comments on commit ca5f6ef

Please sign in to comment.