# HG changeset patch # User Sonny Piers # Date 1330539220 -3600 # Node ID c1566c6981e50b9bef11df7dbb5244c0c0f9863d # Parent 55548845b1770e49b509d10addb8ff8af6f4f8c8 Pubsub configure stanza and method diff --git a/plugins/pubsub.js b/plugins/pubsub.js --- a/plugins/pubsub.js +++ b/plugins/pubsub.js @@ -64,6 +64,14 @@ iq += ""; return iq; }, + setConfig: function(aTo, aNode, aFields) { + var iq = ""; + aFields.forEach(function(field) { + iq += field; + }); + iq += ""; + return iq; + }, setAffiliations: function(aTo, aNode, aAffiliations) { var iq = ""; for (var i = 0; i < aAffiliations.length; i++) @@ -99,6 +107,9 @@ create: function(aTo, aNode, aFields, aResult, aError) { this.send(Lightstring.stanzas.pubsub.create(aTo, aNode, aFields), aResult, aError); }, + configure: function(aTo, aNode, aFields, aResult, aError) { + this.send(Lightstring.stanzas.pubsub.setConfig(aTo, aNode, aFields), aResult, aError); + }, config: function(aTo, aNode, aResult, aError) { this.send(Lightstring.stanzas.pubsub.getConfig(aTo, aNode), function(stanza) { //FIXME: wtf?