diff lightstring.js @ 65:2e8fbf3bce7f

ANONYMOUS auth plugin.
author Sonny Piers <sonny.piers@gmail.com>
date Wed, 01 Feb 2012 21:23:28 +0100
parents d9f5ae0b6d98
children 1c8f326fe3ef
line wrap: on
line diff
--- a/lightstring.js
+++ b/lightstring.js
@@ -141,8 +141,6 @@ Lightstring.Connection.prototype = {
 
     if (!this.jid.bare)
       throw 'Lightstring: Connection.jid is undefined.';
-    if (!this.password)
-      throw 'Lightstring: Connection.password is undefined.';
     if (!this.service)
       throw 'Lightstring: Connection.service is undefined.';
 
@@ -186,6 +184,7 @@ Lightstring.Connection.prototype = {
 
 
       var name = stanza.DOM.localName;
+      //FIXME SASL mechanisms and XMPP features can be both in a stream:features
       if (name === 'features') {
         //SASL mechanisms
         if (stanza.DOM.firstChild.localName === 'mechanisms') {
@@ -196,7 +195,7 @@ Lightstring.Connection.prototype = {
           that.emit('mechanisms', stanza);
         }
         //XMPP features
-        else if (stanza.DOM.firstChild.localName === 'c') {
+        else {
           //TODO: stanza.features
           that.emit('features', stanza);
         }