comparison 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
comparison
equal deleted inserted replaced
67:1c8f326fe3ef 68:e1ccfb580228
46 " xmlns:stream='http://etherx.jabber.org/streams'" + 46 " xmlns:stream='http://etherx.jabber.org/streams'" +
47 " version='1.0'/>" 47 " version='1.0'/>"
48 ); 48 );
49 }, 49 },
50 'features': function (stanza) { 50 'features': function (stanza) {
51 var that = this; 51 var Conn = this;
52 //TODO check if bind supported 52 //TODO check if bind supported
53 var bind = 53 var bind =
54 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" + 54 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
55 "<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>" + 55 "<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>" +
56 (this.jid.resource? "<resource>" + this.jid.resource + "</resource>": "") + 56 (this.jid.resource? "<resource>" + this.jid.resource + "</resource>": "") +
59 this.send( 59 this.send(
60 bind, 60 bind,
61 //Success 61 //Success
62 function(stanza) { 62 function(stanza) {
63 //Session http://xmpp.org/rfcs/rfc3921.html#session 63 //Session http://xmpp.org/rfcs/rfc3921.html#session
64 that.jid = new Lightstring.JID(stanza.DOM.textContent); 64 Conn.jid = new Lightstring.JID(stanza.DOM.textContent);
65 that.send( 65 Conn.send(
66 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" + 66 "<iq type='set' id='"+Lightstring.newId('sendiq:')+"'>" +
67 "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" + 67 "<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>" +
68 "</iq>", 68 "</iq>",
69 function() { 69 function() {
70 that.emit('connected'); 70 Conn.emit('connected');
71 } 71 }
72 ); 72 );
73 }, 73 },
74 //Error 74 //Error
75 function(stanza) { 75 function(stanza) {