diff --git a/js/public/app.js b/js/public/app.js index 59acd7a..3ce3aca 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -133,7 +133,8 @@ var checkNewMessages = function() { if (typeof jsondata['photos'][peerLabel] != 'undefined') { peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"'; } - peerListBuf += '>' + peerLabel + ' (' + val + ')'; + peerListBuf += '>' + peerLabel + ' (' + val + ')'; $('#app-mailbox-peers ul').prepend(peerListBuf); bufferedContacts.push(peerLabel); @@ -329,7 +330,7 @@ function fetchInitialPeerList(jsondata) { fn = jsondata['contacts'][id]; peerLabel = fn; } - if ($.inArray(peerLabel, bufferedContacts) == -1) { + if (inArray(peerLabel, bufferedContacts)) { aScope.addContact({'label': peerLabel, 'nav': idxVal2, 'avatar': jsondata['photos'][peerLabel]}); bufferedContacts.push(peerLabel); }