[Pkg-javascript-commits] [ltx] 25/469: connection: xmlns usage fix

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:00:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit d85f5568bd15e65b1c6ca119035e830bb38eab70
Author: Astro <astro at spaceboyz.net>
Date:   Sun May 30 23:18:16 2010 +0200

    connection: xmlns usage fix
---
 lib/xmpp/connection.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/xmpp/connection.js b/lib/xmpp/connection.js
index 9aedbe4..80f798e 100644
--- a/lib/xmpp/connection.js
+++ b/lib/xmpp/connection.js
@@ -108,10 +108,10 @@ Connection.prototype.onData = function(data) {
  * before 'rawStanza' events are emitted to the derived classes.
  */
 Connection.prototype.onStanza = function(stanza) {
-    if (stanza.name == 'stream:error') {
+    if (stanza.is('error', NS_STREAM)) {
 	/* TODO: extract error text */
 	this.emit('error', stanza);
-    } else if (stanza.is('stream:features', NS_STREAM) &&
+    } else if (stanza.is('features', NS_STREAM) &&
 	       this.allowTLS &&
 	       stanza.getChild('starttls', NS_XMPP_TLS)) {
 	/* Signal willingness to perform TLS handshake */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list