1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-20 04:43:04 +00:00

Fix number with spaces issue into peerlist

* Also factorize one function
This commit is contained in:
Loic Blot
2014-10-22 12:38:36 +00:00
parent f94d3ea277
commit 621383e996
3 changed files with 19 additions and 18 deletions
+4 -4
View File
@@ -197,14 +197,14 @@ function fetchInitialPeerList(jsondata) {
var bufferedContacts = [];
$.each(jsondata['phonelist'], function(id, val) {
var fn, peerLabel;
if (typeof jsondata['contacts'][val] == 'undefined') {
var fn, peerLabel, idxVal;
idxVal = val.replace(/ /g,'/');
if (typeof jsondata['contacts'][idxVal] == 'undefined') {
fn = '';
peerLabel = val;
}
else {
fn = jsondata['contacts'][val];
fn = jsondata['contacts'][idxVal];
peerLabel = fn;
}
if ($.inArray(peerLabel, bufferedContacts) == -1) {