From efb62aec527203b1f14e199b3895fcf970b29c23 Mon Sep 17 00:00:00 2001 From: Leberwurscht Date: Tue, 17 Apr 2012 23:09:26 +0200 Subject: [PATCH] jappixmini: fix names --- jappixmini/lib.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jappixmini/lib.js b/jappixmini/lib.js index 1794def6..6c47f590 100644 --- a/jappixmini/lib.js +++ b/jappixmini/lib.js @@ -162,17 +162,17 @@ function jappixmini_manage_roster(contacts, contacts_hash, autoapprove, autosubs // ignore accounts that are not in the list if (contacts[xid]===undefined) return; - // add to Friendica group if necessary + // add to Friendica group or change name if necessary var groups = []; node.find('group').each(function() { var group_text = $(this).text(); if (group_text) groups.push(group_text); }); - if ($.inArray("Friendica", groups)==-1) { + if ($.inArray("Friendica", groups)==-1 || name!=contacts[xid]) { groups.push("Friendica"); - sendRoster(xid, null, null, groups); - console.log("Added "+xid+" to Friendica group."); + sendRoster(xid, null, contacts[xid], groups); + console.log("Added "+xid+" to Friendica group and set name to "+contacts[xid]+"."); } // authorize if necessary -- 2.39.5