# HG changeset patch # User Emmanuel Gil Peyrot # Date 1302189127 -7200 # Node ID ca17b63f561f4cd55c288aff0d9ec671bb849c96 # Parent 296de54c1c4bc4a2743dea718be72567c638f664 Fix auto-subscribe of owner. diff --git a/notifs.js b/notifs.js --- 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];