Mercurial > eldonilo > lightstring
diff lightstring.js @ 50:770bb8460df8
Some improvements on namespaces.
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Wed, 01 Feb 2012 03:12:14 +0100 |
parents | 3dfb596cf669 |
children | 63c1c8bc8c19 |
line wrap: on
line diff
--- a/lightstring.js +++ b/lightstring.js @@ -23,10 +23,11 @@ var Lightstring = { /** * @namespace Holds XMPP namespaces. + * @description http://xmpp.org/xmpp-protocols/protocol-namespaces */ ns: { - stream: 'http://etherx.jabber.org/streams', - jabberClient: 'jabber:client' + streams: 'http://etherx.jabber.org/streams', + jabber_client: 'jabber:client' }, /** * @namespace Holds XMPP stanza builders. @@ -36,8 +37,8 @@ var Lightstring = { open: function(aService) { //FIXME no ending "/" - node-xmpp-bosh bug return "<stream:stream to='" + aService + "'" + - " xmlns='" + Lightstring.ns.jabberClient + "'" + - " xmlns:stream='" + Lightstring.ns.stream + "'" + + " xmlns='" + Lightstring.ns['jabber_client'] + "'" + + " xmlns:stream='" + Lightstring.ns.['streams'] + "'" + " version='1.0'/>"; }, close: function() {