addFriend(entries[item].getAttribute('jid'), nick);
}
connection.addHandler(_cbPEP, NS_PEP, 'message');
- var initialPresence = $pres().c('c', {xmlns: NS_CAPS, hash: 'sha-1', node: 'http://jabber.babelmonkeys.de', ver: genCaps()}).up();
+ var initialPresence = $pres().c('show').t('online').up().c('status').t('Hy, I am an socialXMPP instance').up().c('priority').t('0').up().c('c', {xmlns: NS_CAPS, hash: 'sha-1', node: 'http://jabber.babelmonkeys.de', ver: genCaps()}).up();
connection.send(initialPresence.tree());
return false;
}
function _cbMessage(msg) {
+ if ($(msg).attr('type') != 'chat')
+ return;
var jid = $(msg).attr('from');
var id = jid2id($(msg).attr('from')) + 'Chat';
var body = $(msg).find('body:first').text();