comparison plugins/roster.js @ 35:bdfbd58b4835

Fix plugins.
author Sonny Piers <sonny.piers@gmail.com>
date Sat, 28 Jan 2012 04:55:29 +0100
parents 1506992c33e2
children 48e2bd6b1885
comparison
equal deleted inserted replaced
34:6ce66fba0242 35:bdfbd58b4835
36 remove: function(aAddress) { 36 remove: function(aAddress) {
37 return $iq({type: 'set'}).c('query', {xmlns: Lightstring.NS.roster}).c('item', {jid: aAddress, subscription: 'remove'}).tree(); 37 return $iq({type: 'set'}).c('query', {xmlns: Lightstring.NS.roster}).c('item', {jid: aAddress, subscription: 'remove'}).tree();
38 } 38 }
39 }; 39 };
40 Lightstring.getRoster = function(connection, aCallback) { 40 Lightstring.getRoster = function(connection, aCallback) {
41 connection.send(this.stanza.roster.get(), function(answer){ 41 connection.send(this.stanza.roster.get(), function(stanza){
42 var contacts = []; 42 var contacts = [];
43 var elems = answer.querySelectorAll('item'); 43 var elems = stanza.DOM.querySelectorAll('item');
44 for(var i = 0; i<elms.length; i++) { 44 for(var i = 0; i<elms.length; i++) {
45 var item = elms[i]; 45 var item = elms[i];
46 var jid = item.getAttribute('jid'); 46 var jid = item.getAttribute('jid');
47 var name = item.getAttribute('name'); 47 var name = item.getAttribute('name');
48 var groups = item.querySelectorAll('group'); 48 var groups = item.querySelectorAll('group');