Mercurial > eldonilo > lightstring
diff plugins/pubsub.js @ 89:55548845b177
typos
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Wed, 29 Feb 2012 17:48:05 +0100 |
parents | 0f6f213f0a33 |
children | c1566c6981e5 |
line wrap: on
line diff
--- a/plugins/pubsub.js +++ b/plugins/pubsub.js @@ -46,9 +46,12 @@ retract: function(aTo, aNode, aItem) { return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><retract node='" + aNode + "'><item id='" + aItem + "'/></retract></pubsub></iq>"; }, - 'delete': function(aTo, aNode, aURI) { + delete: function(aTo, aNode) { return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub_owner + "'><delete node='" + aNode + "'/></pubsub></iq>"; }, + purge: function(aTo, aNode) { + return "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub_owner + "'><purge node='" + aNode + "'/></pubsub></iq>"; + }, create: function(aTo, aNode, aFields) { var iq = "<iq type='set' to='" + aTo + "'><pubsub xmlns='" + Lightstring.ns.pubsub + "'><create node='" + aNode + "'/>"; if (aFields) { @@ -112,9 +115,12 @@ publish: function(aTo, aNode, aItem, aId, aResult, aError) { this.send(Lightstring.stanzas.pubsub.publish(aTo, aNode, aItem, aId), aResult, aError); }, - 'delete': function(aTo, aNode, aResult, aError) { + delete: function(aTo, aNode, aResult, aError) { this.send(Lightstring.stanzas.pubsub.delete(aTo, aNode), aResult, aError); }, + purge: function(aTo, aNode, aResult, aError) { + this.send(Lightstring.stanzas.pubsub.purge(aTo, aNode), aResult, aError); + }, getAffiliations: function(aTo, aNode, aResult, aError) { this.send(Lightstring.stanzas.pubsub.affiliations(aTo, aNode), function(stanza) { if((stanza.DOM.getAttribute('type') === 'result') && aResult, aError) {