Mercurial > psgxs
comparison modules/mod_configure.js @ 58:b98e545a94f7 default tip
Always use children instead of tags. Might break something.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 13 Sep 2011 00:54:55 +0200 |
parents | addbf6bbfaa8 |
children |
comparison
equal
deleted
inserted
replaced
57:addbf6bbfaa8 | 58:b98e545a94f7 |
---|---|
128 number: 1, | 128 number: 1, |
129 func: function(response, stanza, request, to) { | 129 func: function(response, stanza, request, to) { |
130 if (!config.enabled('config-node')) | 130 if (!config.enabled('config-node')) |
131 return makeError(response, errors.owner.configure.node_configuration_not_supported.n); | 131 return makeError(response, errors.owner.configure.node_configuration_not_supported.n); |
132 | 132 |
133 var nodeID = stanza.tags[0].tags[0].getAttribute('node'); | 133 var nodeID = stanza.children[0].children[0].getAttribute('node'); |
134 if (!nodeID) | 134 if (!nodeID) |
135 return makeError(response, errors.nodeid_required.n); | 135 return makeError(response, errors.nodeid_required.n); |
136 if (!storage.existsNode(nodeID)) | 136 if (!storage.existsNode(nodeID)) |
137 return makeError(response, errors.node_does_not_exist.n); | 137 return makeError(response, errors.node_does_not_exist.n); |
138 | 138 |