changeset 39:4c808bfe0658

Various little fixes.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 15 Dec 2010 22:22:14 +0100
parents 5395a501c991
children 741110cdcfcf
files modules/mod_adhoc.js modules/mod_publish.js modules/mod_retrieve.js modules/mod_subscribe.js
diffstat 4 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/mod_adhoc.js
+++ b/modules/mod_adhoc.js
@@ -5,6 +5,7 @@ var errors = require('../errors');
 var makeError = errors.makeError;
 var toBareJID = require('../fdsq').toBareJID;
 var NS = require('../namespaces');
+var xmpp = require('xmpp');
 
 // XEP-0050: Ad-Hoc Commands
 exports.adHoc = {
--- a/modules/mod_publish.js
+++ b/modules/mod_publish.js
@@ -2,6 +2,7 @@ var config = require('../configuration')
 var storage = require('../storage');
 var notifs = require('../notifs');
 var errors = require('../errors');
+var makeError = errors.makeError;
 var fdsq = require('../fdsq');
 var toBareJID = fdsq.toBareJID;
 var NS = require('../namespaces');
--- a/modules/mod_retrieve.js
+++ b/modules/mod_retrieve.js
@@ -21,7 +21,7 @@ exports.retrieveSubscriptions = {
 		if (nodeID && nodeID != '') {
 			if (!storage.existsNode(nodeID))
 				return makeError(response, errors.node_does_not_exist.n);
-			var subs = storage.getSubscription(toBareJID(to), node);
+			var subs = storage.getSubscription(toBareJID(to), nodeID);
 		} else
 			var subs = storage.getSubscription(toBareJID(to));
 
--- a/modules/mod_subscribe.js
+++ b/modules/mod_subscribe.js
@@ -1,6 +1,7 @@
 var config = require('../configuration');
 var storage = require('../storage');
 var errors = require('../errors');
+var notifs = require('../notifs');
 var makeError = errors.makeError;
 var toBareJID = require('../fdsq').toBareJID;
 var NS = require('../namespaces');
@@ -105,7 +106,7 @@ exports.unsubscribe = {
 	child: 'pubsub',
 	ns: NS.PUBSUB,
 	child2: 'unsubscribe',
-	func: function(response, stanza, request) {
+	func: function(response, stanza, request, to) {
 		if (!config.enabled('subscribe'))
 			return makeError(response, errors.sub.subscribe.not_supported.n);