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:
+4
-4
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user