Mercurial > psgxs
diff modules/mod_manage.js @ 41:bc717575e66a
Much better handling of modules.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 20 Feb 2011 15:51:12 +0100 |
parents | 6697f394301f |
children | 023f767662d3 |
line wrap: on
line diff
--- a/modules/mod_manage.js +++ b/modules/mod_manage.js @@ -1,10 +1,3 @@ -var config = require('../configuration'); -var storage = require('../storage'); -var errors = require('../errors'); -var makeError = errors.makeError; -var toBareJID = require('../fdsq').toBareJID; -var NS = require('../namespaces'); - // SECTION 8.8.1: Retrieve Subscriptions List exports.manageRetrieveSub = { type: 'get', @@ -25,8 +18,8 @@ exports.manageRetrieveSub = { if (affil != 'super-owner' && affil != 'owner') return makeError(response, errors.forbidden.n); - response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}); - response.c('subscriptions', {node: nodeID}); + response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}) + .c('subscriptions', {node: nodeID}); var subs = storage.getSubscriptionsFromNodeID(nodeID) for (var jid in subs) @@ -57,8 +50,8 @@ exports.manageRetrieveAff = { if (affil != 'super-owner' && affil != 'owner') return makeError(response, errors.owner.manage_affiliations.retrieve_list.entity_is_not_an_owner.n); - response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}); - response.c('affiliations', {node: nodeID}); + response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}) + .c('affiliations', {node: nodeID}); for (var jid in affils) response.c('affiliation', {jid: jid, affiliation: affils[jid]}).up();