diff psgxs.js @ 20:957550e2d5a1

Correct an error identifier and use an already defined variable.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 19 Oct 2010 18:55:53 +0200
parents 032090a13fe8
children e55b31f12f8c
line wrap: on
line diff
--- a/psgxs.js
+++ b/psgxs.js
@@ -735,7 +735,7 @@ function onIq(stanza) {
 					instant = true;
 				}
 				if (storage.existsNode(nodeID))
-					return makeError(response, errors.nodeid_already_exists.n);
+					return makeError(response, errors.owner.create.nodeid_already_exists.n);
 
 				var bare = toBareJID(to);
 				var right = false;
@@ -774,7 +774,7 @@ function onIq(stanza) {
 
 				if (!conf)
 					conf = {};
-				conf['pubsub#creator'] = toBareJID(to);
+				conf['pubsub#creator'] = bare;
 
 				var r = storage.createNode(nodeID, conf);
 				if (typeof r == 'number')