# HG changeset patch # User Sonny Piers # Date 1327710420 -3600 # Node ID b6e4bc19ff5afe43e35c121024466cc6383c6421 # Parent fc577e5b2f4aec5482385b63346376b7c021db78# Parent 82bffc4a07a9604b43fe025747063969635416c8 undoing diff --git a/lightstring.js b/lightstring.js --- a/lightstring.js +++ b/lightstring.js @@ -269,12 +269,17 @@ Lightstring.Connection.prototype = { that.emit('DOMInput', elm); that.emit(elm.tagName, elm); +<<<<<<< HEAD + if (elm.tagName === 'iq') + that.emit(elm.getAttribute('id'), elm); +======= if (elm.tagName === 'iq') { var payload = elm.firstChild; if (payload) that.emit('iq/' + payload.namespaceURI + ':' + payload.localName, elm); that.emit(elm.getAttribute('id'), elm); //FIXME: possible attack vector. } +>>>>>>> f6a7c0f93d154c2cd34dfdda4ab8eec808b91b34 }); }, /** diff --git a/plugins.js b/plugins.js --- a/plugins.js +++ b/plugins.js @@ -188,6 +188,56 @@ Lightstring.NS.x = "jabber:x:data"; Lightstring.NS.pubsub = "http://jabber.org/protocol/pubsub"; Lightstring.NS.pubsub_owner = "http://jabber.org/protocol/pubsub#owner"; Lightstring.stanza.pubsub = { +<<<<<<< HEAD + getConfig: function(aTo, aNode) { + return ""; + }, + items: function(aTo, aNode) { + return ""; + }, + affiliations: function(aTo, aNode) { + return ""; + }, + publish: function(aTo, aNode, aItem, aId) { + return ""+aItem+""; + }, + retract: function(aTo, aNode, aItem) { + return ""; + }, + 'delete': function(aTo, aNode, aURI) { + return ""; + }, + config: function(aTo, aNode, aFields) { + var iq = ""; + if(aFields) { + aFields.forEach(function(field) { + iq += field; + }); + } + iq += ""; + return iq; + }, + create: function(aTo, aNode, aFields) { + var iq = ""; + if(aFields) { + iq += "" + aFields.forEach(function(field) { + iq += field; + }); + iq += ""; + } + iq += ""; + return iq; + }, + setAffiliations: function(aTo, aNode, aAffiliations) { + var iq = ""; + for(var i = 0; i < aAffiliations.length; i++) { + iq += "" + } + iq += ""; + return iq; + }, +======= getConfig: function(aTo, aNode) { return ""; }, @@ -226,6 +276,7 @@ Lightstring.stanza.pubsub = { iq += ""; return iq; }, +>>>>>>> f6a7c0f93d154c2cd34dfdda4ab8eec808b91b34 }; Lightstring.pubsubItems = function(aConnection, aTo, aNode, aCallback) { aConnection.send(Lightstring.stanza.pubsub.items(aTo, aNode), function(answer){