Mercurial > psgxs
diff psgxs.js @ 4:4c93e76fa371
Ensure that the creator of a node is the default owner; don’t crash
when sending metadata.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 29 Jun 2010 13:38:07 +0200 |
parents | 80e607c0b39e |
children | 2bcadb0531f4 |
line wrap: on
line diff
--- a/psgxs.js +++ b/psgxs.js @@ -92,7 +92,7 @@ function onIq(stanza) { // SECTION 5.4 if (config.enabled('meta-data')) { - var x = forms.build('result', 'meta-data', storage.getMetadata(nodeID), true); + var x = forms.build('result', 'node_metadata', storage.getMetadata(nodeID), true); if (x) q.cx(x); } @@ -669,7 +669,7 @@ function onIq(stanza) { var nodeID = pubsub.getChild('create').getAttribute('node'); if (!nodeID || nodeID == '') { - if (config.enabled('instant-nodes')) + if (!config.enabled('instant-nodes')) return makeError(response, errors.owner.create.instant_nodes_not_supported.n); nodeID = utils.makeRandomId(); instant = true; @@ -961,7 +961,7 @@ function sendNotifs(notifs, type, nodeID args.jid = attr; } var affiliations = xmpp.stanza('affiliations', {node: nodeID}) - .c('affiliation', {args}); + .c('affiliation', args); ev.cx(affiliations); } else if (type == 'collection') { var collection = xmpp.stanza('collection', {node: nodeID});