Skip to content

Commit

Permalink
fix: getAllContacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Feb 27, 2021
1 parent a06c4fc commit 9cd653e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lib/wapi/functions/get-all-contacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNMMNMNMMMNMMNNMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNMMNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
*/
export const getAllContacts = function (done) {
const contacts = window.Store.Contact.map((contact) =>
export const getAllContacts = function () {
const allContacts = window.Store.Contact.map((contact) =>
WAPI._serializeContactObj(contact)
);

if (done !== undefined) done(contacts);
return contacts;
return allContacts.filter((result) => {
return result.isUser === true;
});
};

0 comments on commit 9cd653e

Please sign in to comment.