Mercurial > psgxs
changeset 53:ca17b63f561f
Fix auto-subscribe of owner.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 07 Apr 2011 17:12:07 +0200 |
parents | 296de54c1c4b |
children | c2c9c06d6e9d |
files | notifs.js |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/notifs.js +++ b/notifs.js @@ -45,7 +45,7 @@ exports.send = function(notifs, type, no var configuration = xmpp.stanza('configuration', {node: nodeID}); if (a1) { - var x = forms.build('node_config', service_configuration.node_config, storage.getConfiguration(nodeID)); + var x = forms.build('node_config', config.service_configuration.node_config, storage.getConfiguration(nodeID)); if (x) configuration.cnode(x); //TODO: voir exemple 150 } @@ -116,6 +116,11 @@ exports.send = function(notifs, type, no } else subs = notifs; + var affils = storage.getAffiliationsFromNodeID(nodeID); + for (var i in affils) + if (!(i in subs) || affils[i] == 'owner') + subs[i] = new config.Configuration(config.service_configuration.subscribe_options); + for (var i in subs) { var sub = subs[i];