view stanzas.js @ 15:5149a856d9dd default tip

Fix hybrid mode.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 03 Nov 2011 17:28:49 -0700
parents 161d4ea1c3f8
children
line wrap: on
line source

var stanzas = {
	discoInfo: function(aTo, aNode) {
		if(aTo)
			var iq = "<iq type='get' to='"+aTo+"'>";
		else
			var iq = "<iq type='get'>";
		if(aNode)
			var query = "<query xmlns='"+ns.info+"' node='"+aNode+"'/>";
		else
			var query = "<query xmlns='"+ns.info+"'/>";
			
		return iq+query+"</iq>";
	},
	pubsubItems: function(aTo, aNode) {
		return  "<iq type='get' to='"+aTo+"'><pubsub xmlns='"+ns.ps+"'><items node='"+aNode+"'/></pubsub></iq>";
	},
};

if (typeof module !== 'undefined')
	module.exports = stanzas;