diff modules/mod_subscribe.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 addbf6bbfaa8
line wrap: on
line diff
--- a/modules/mod_subscribe.js
+++ b/modules/mod_subscribe.js
@@ -39,12 +39,12 @@ exports.subscribe = {
 		if (!configuration['pubsub#subscribe'])
 			return makeError(response, errors.sub.subscribe.not_supported.n);
 
-		var affil = storage.getAffiliation(toBareJID(to), nodeID);
+		var affil = storage.getAffiliation(JID.toBare(to), nodeID);
 		if (affil == 'publish-only' || affil == 'outcast')
 			return makeError(response, errors.pub.publish.insufficient_privileges.n);
 
 		var jid = request.getAttribute('jid');
-		if (!jid || toBareJID(jid) != toBareJID(to))
+		if (!jid || JID.toBare(jid) != JID.toBare(to))
 			return makeError(response, errors.sub.subscribe.jids_do_not_match.n);
 
 		/*
@@ -130,7 +130,7 @@ exports.unsubscribe = {
 			return makeError(response, errors.node_does_not_exist.n);
 
 		var jid = request.getAttribute('jid');
-		if (!jid || toBareJID(jid) != toBareJID(to))
+		if (!jid || JID.toBare(jid) != JID.toBare(to))
 			return makeError(response, errors.sub.unsubscribe.insufficient_privileges.n);
 
 		var subID = storage.subscribe(nodeID, jid, 'none');