diff storage.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 c979c4d0932b
line wrap: on
line diff
--- a/storage.js
+++ b/storage.js
@@ -27,7 +27,7 @@ var config = require('./configuration');
 var service_configuration = config.service_configuration;
 var Configuration = config.Configuration;
 var fdsq = require('./fdsq');
-var toBareJID = fdsq.toBareJID;
+var toBare = fdsq.toBare;
 
 var nodes = require('./nodes');
 var Node = nodes.Node;
@@ -308,12 +308,12 @@ storage.getSubscription = function(jid, 
 	if (nodeID) {
 		var node = storage.getNode(nodeID);
 		for (var sub in node.subscribers)
-			if (toBareJID(sub) == jid)
+			if (toBare(sub) == jid)
 				return node.subscribers[sub]
 	} else {
 		for (var node in backend.list) {
 			for (var sub in backend.list[node].subscribers) {
-				if (toBareJID(sub) == jid)
+				if (toBare(sub) == jid)
 					subs[node] = backend.list[node].subscribers[sub];
 			}
 		}