changeset 19:032090a13fe8

Can’t send subscription-options to non-subscribed people.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 19 Oct 2010 18:53:54 +0200
parents 75625771e410
children 957550e2d5a1
files psgxs.js
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/psgxs.js
+++ b/psgxs.js
@@ -249,7 +249,7 @@ function onIq(stanza) {
 					return makeError(response, errors.sub.configure.insufficient_privileges.n);
 
 				var subs = storage.getSubscription(jid, nodeID);
-				if (subs == {})
+				if (!subs.subid) // FIXME: better test for empty object.
 					return makeError(response, errors.sub.configure.no_such_subscriber.n);
 
 				var s = xmpp.stanza('options', {node: nodeID, jid: jid});