Mercurial > eldonilo > lightstring
diff plugins/DIGEST-MD5.js @ 68:e1ccfb580228
Replaces that by Conn.
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Thu, 02 Feb 2012 00:00:34 +0100 |
parents | fa184759fc41 |
children | e4899c122d7b |
line wrap: on
line diff
--- a/plugins/DIGEST-MD5.js +++ b/plugins/DIGEST-MD5.js @@ -48,7 +48,7 @@ Lightstring.plugins['DIGEST-MD5'] = { ); }, 'features': function (stanza) { - var that = this; + var Conn = this; //TODO check if bind supported var bind = "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" + @@ -61,13 +61,13 @@ Lightstring.plugins['DIGEST-MD5'] = { //Success function(stanza) { //Session http://xmpp.org/rfcs/rfc3921.html#session - that.jid = new Lightstring.JID(stanza.DOM.textContent); - that.send( + Conn.jid = new Lightstring.JID(stanza.DOM.textContent); + Conn.send( "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" + "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" + "</iq>", function() { - that.emit('connected'); + Conn.emit('connected'); } ); },