Mercurial > eldonilo > lightstring
comparison plugins/pubsub.js @ 75:619f3ffa125a
Lightstring.namespaces has been renamed to Lightstring.ns.
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Mon, 06 Feb 2012 17:37:16 +0100 |
parents | 7cb0037bf43c |
children | 50d36b093e3a |
comparison
equal
deleted
inserted
replaced
74:7cb0037bf43c | 75:619f3ffa125a |
---|---|
130 this.send(Lightstring.stanza.pubsub.setAffiliations(aTo, aNode, aAffiliations), aResult, aError); | 130 this.send(Lightstring.stanza.pubsub.setAffiliations(aTo, aNode, aAffiliations), aResult, aError); |
131 } | 131 } |
132 }, | 132 }, |
133 init: function() { | 133 init: function() { |
134 //TODO: find a way to put that in handlers, it’s UGLY! | 134 //TODO: find a way to put that in handlers, it’s UGLY! |
135 this.on('in-message-*-' + Lightstring.namespaces['pubsub_event'] + ':event', function(stanza) { | 135 this.on('in-message-*-' + Lightstring.ns['pubsub_event'] + ':event', function(stanza) { |
136 var payload = stanza.firstChild.firstChild; //XXX | 136 var payload = stanza.firstChild.firstChild; //XXX |
137 if (payload.namespaceURI !== Lightstring.namespaces['pubsub_event']) | 137 if (payload.namespaceURI !== Lightstring.namespaces['pubsub_event']) |
138 return; //TODO: emit something. | 138 return; //TODO: emit something. |
139 | 139 |
140 var name = payload.localName; | 140 var name = payload.localName; |