}
function getVCard(jid) {
- var id = 'getvCard'+jid2id(jid);
+ var id = connection.getUniqueId('vCardGet');
if (roster[jid2id(jid)].vCard == "") {
var vCardiq = $iq({'to':jid,
'id':id,
}
function getOwnInfo() {
- var id = 'getvCard'+jid2id(connection.jid);
+ var id = connection.getUniqueId('vCardGet');
var vCardiq = $iq({'to': Strophe.getBareJidFromJid(connection.jid),
'id': id,
'type': 'get'}
connection.addHandler(_cbOwnVCard, null, 'iq', 'result', id);
connection.send(vCardiq.tree());
}
-
function addFriend(jid, nick) {
roster[jid2id(jid)] = new Buddy(nick, jid);
$('#friends').append('<div class="friend" id="'+jid2id(jid)+'"><img src="imgs/none.png" /><br /><a class="nick">'+nick+'</a></div>');
var initialPresence = $pres().c('show').t('online').up().c('status').t('Hy, I am an socialXMPP instance').up().c('priority').t('1').up().c('c', {xmlns: NS_CAPS, hash: 'sha-1', node: 'http://jabber.babelmonkeys.de', ver: genCaps()}).up();
connection.send(initialPresence.tree());
+ $('#friends').show();
+
return false;
}
function getRoster() {
- var id = 'getRoster';
+ var id = connection.getUniqueId('roster');
var rosteriq = $iq({'id':id,
'type':'get'}
$('#log').empty();
$('#ownInfo').hide();
$('#vCard_container').empty();
- $('#friends').empty();
+ $('#friends').hide();
$('.chat').remove();
$('label').show();
jid.show();