Mercurial > eldonilo > lightstring
changeset 50:770bb8460df8
Some improvements on namespaces.
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Wed, 01 Feb 2012 03:12:14 +0100 |
parents | e25dfe389dab |
children | 63c1c8bc8c19 |
files | lightstring.js |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
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() {