view modules/mod_version.js @ 54:c2c9c06d6e9d

Fix problems with unneeded text nodes.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 06 May 2011 17:51:15 +0200
parents 023f767662d3
children
line wrap: on
line source

/*
 *  Copyright (C) 2010  Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
 *
 *  This file is part of PSĜS, a PubSub server written in JavaScript.
 *
 *  PSĜS is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 *  published by the Free Software Foundation, either version 3 of the
 *  License.
 *
 *  PSĜS is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with PSĜS.  If not, see <http://www.gnu.org/licenses/>.
 */

'use strict';

// XEP-0092: Software Version
exports.version = {
	type: 'get',
	child: 'query',
	ns: NS.VERSION,
	func: function(response) {
		response.c('query', {xmlns: NS.VERSION})
			.s('name').t('PSĜS')
			.s('version').t(config.version)
			.s('os').t(config.os);
		return response;
	}
}