diff modules/mod_retrieve.js @ 47:0d3f18bb1d36

Remove usage of fdsq.js in modules.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 10 Mar 2011 16:13:49 +0100
parents 023f767662d3
children c2c9c06d6e9d
line wrap: on
line diff
--- a/modules/mod_retrieve.js
+++ b/modules/mod_retrieve.js
@@ -33,9 +33,9 @@ exports.retrieveSubscriptions = {
 		if (nodeID && nodeID != '') {
 			if (!storage.existsNode(nodeID))
 				return makeError(response, errors.node_does_not_exist.n);
-			var subs = storage.getSubscription(toBareJID(to), nodeID);
+			var subs = storage.getSubscription(JID.toBare(to), nodeID);
 		} else
-			var subs = storage.getSubscription(toBareJID(to));
+			var subs = storage.getSubscription(JID.toBare(to));
 
 		response.c('pubsub', {xmlns: NS.PUBSUB})
 			.c('subscriptions');
@@ -62,9 +62,9 @@ exports.retrieveAffiliations = {
 			if (!storage.existsNode(nodeID))
 				return makeError(response, errors.node_does_not_exist.n);
 			var affils = {};
-			affils[nodeID] = storage.getAffiliation(toBareJID(to), nodeID);
+			affils[nodeID] = storage.getAffiliation(JID.toBare(to), nodeID);
 		} else
-			var affils = storage.getAffiliationsFromJID(toBareJID(to));
+			var affils = storage.getAffiliationsFromJID(JID.toBare(to));
 
 		response.c('pubsub', {xmlns: NS.PUBSUB})
 			.c('affiliations');
@@ -94,7 +94,7 @@ exports.retrieveItems = {
 
 		var configuration = storage.getConfiguration(nodeID);
 		if (configuration['pubsub#access_model'] == 'whitelist') {
-			var affil = storage.getAffiliation(toBareJID(to), nodeID);
+			var affil = storage.getAffiliation(JID.toBare(to), nodeID);
 			if (affil != 'super-owner' && affil != 'owner' && affil != 'publisher' && affil != 'member')
 				return makeError(response, errors.pub.publish.insufficient_privileges.n);
 		}