diff plugins/PLAIN.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 c06ec02217ee
line wrap: on
line diff
--- a/plugins/PLAIN.js
+++ b/plugins/PLAIN.js
@@ -53,7 +53,7 @@ Lightstring.plugins['PLAIN'] = {
       );
     },
     'features': function (stanza) {
-      var that = this;
+      var Conn = this;
       //TODO check if bind supported
       var bind =
         "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
@@ -66,13 +66,13 @@ Lightstring.plugins['PLAIN'] = {
         //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');
             }
           );
         },