comparison plugins/vcard.js @ 35:bdfbd58b4835

Fix plugins.
author Sonny Piers <sonny.piers@gmail.com>
date Sat, 28 Jan 2012 04:55:29 +0100
parents 1506992c33e2
children e25dfe389dab
comparison
equal deleted inserted replaced
34:6ce66fba0242 35:bdfbd58b4835
28 return "<iq type='get'><vCard xmlns='"+Lightstring.NS.vcard+"'/></iq>"; 28 return "<iq type='get'><vCard xmlns='"+Lightstring.NS.vcard+"'/></iq>";
29 } 29 }
30 }; 30 };
31 //FIXME we should return a proper vcard, not an XMPP one 31 //FIXME we should return a proper vcard, not an XMPP one
32 Lightstring.getVcard = function(aConnection, aTo, aCallback) { 32 Lightstring.getVcard = function(aConnection, aTo, aCallback) {
33 aConnection.send(Lightstring.stanza.vcard.get(aTo), function(answer, err){ 33 aConnection.send(Lightstring.stanza.vcard.get(aTo), function(stanza, err){
34 if(answer) { 34 if(stanza) {
35 var vcard = answer.querySelector('vCard'); 35 var vcard = stanza.DOM.querySelector('vCard');
36 if(vcard) 36 if(vcard)
37 aCallback(vcard); 37 aCallback(vcard);
38 } 38 }
39 else 39 else
40 aCallback(null); 40 aCallback(null);