diff --git a/src/lib/wapi/functions/get-all-contacts.js b/src/lib/wapi/functions/get-all-contacts.js index 12dcf9d99..1fa1854bf 100644 --- a/src/lib/wapi/functions/get-all-contacts.js +++ b/src/lib/wapi/functions/get-all-contacts.js @@ -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; + }); };