From 922a5bf853332f6f6dcb1184e26b5954693bc8b2 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sun, 5 Oct 2014 09:01:47 +0000 Subject: [PATCH] Show contact names instead of numbers --- js/script.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index cfc43cf..7fd8788 100644 --- a/js/script.js +++ b/js/script.js @@ -124,7 +124,16 @@ function changeSelectedConversation(item) { var peerListBuf = ""; $.each(jsondata['phonelist'], function(id, val) { - peerListBuf += '
  • ' + val + '
  • '; + var fn, peerLabel; + if (typeof jsondata['contacts'][val] == 'undefined') { + fn = ''; + peerLabel = val; + } + else { + fn = jsondata['contacts'][val]; + peerLabel = fn; + } + peerListBuf += '
  • ' + peerLabel + '
  • '; }); $('#app-mailbox-peers ul').html(peerListBuf);