Mercurial > psgxs
comparison modules/mod_options.js @ 30:b2faacfefb90
Rewrite of the module manager; fix of some modules; fix of the directory backend.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 04 Nov 2010 17:50:52 +0100 |
parents | b80ab94da447 |
children | 6697f394301f |
comparison
equal
deleted
inserted
replaced
29:e007a6364bf0 | 30:b2faacfefb90 |
---|---|
5 var makeError = errors.makeError; | 5 var makeError = errors.makeError; |
6 var toBareJID = require('../util').toBareJID; | 6 var toBareJID = require('../util').toBareJID; |
7 var NS = require('../namespaces'); | 7 var NS = require('../namespaces'); |
8 | 8 |
9 // SECTION 6.3.2: Configure Subscription Options (Request) | 9 // SECTION 6.3.2: Configure Subscription Options (Request) |
10 exports.configureSub = { | 10 exports.getConfigureSub = { |
11 type: 'get', | 11 type: 'get', |
12 child: 'pubsub', | 12 child: 'pubsub', |
13 ns: NS.PUBSUB, | 13 ns: NS.PUBSUB, |
14 pschild: 'options', | 14 child2: 'options', |
15 func: function(response, stanza, request, to) { | 15 func: function(response, stanza, request, to) { |
16 if (!config.enabled('subscription-options')) | 16 if (!config.enabled('subscription-options')) |
17 return makeError(response, errors.sub.configure.subscription_options_not_supported.n); | 17 return makeError(response, errors.sub.configure.subscription_options_not_supported.n); |
18 | 18 |
19 var nodeID = request.getAttribute('node'); | 19 var nodeID = request.getAttribute('node'); |
45 // SECTIONS 6.3.5: Form Submission | 45 // SECTIONS 6.3.5: Form Submission |
46 exports.configureSub = { | 46 exports.configureSub = { |
47 type: 'set', | 47 type: 'set', |
48 child: 'pubsub', | 48 child: 'pubsub', |
49 ns: NS.PUBSUB, | 49 ns: NS.PUBSUB, |
50 pschild: 'options', | 50 child2: 'options', |
51 func: function(response, stanza, request, to) { | 51 func: function(response, stanza, request, to) { |
52 if (!config.enabled('subscription-options')) | 52 if (!config.enabled('subscription-options')) |
53 return makeError(response, errors.sub.subscribe.not_supported.n); | 53 return makeError(response, errors.sub.subscribe.not_supported.n); |
54 | 54 |
55 var nodeID = unsubscribe.getAttribute('node'); | 55 var nodeID = unsubscribe.getAttribute('node'); |
81 // SECTION 6.4: Request Default Subscription Configuration Options | 81 // SECTION 6.4: Request Default Subscription Configuration Options |
82 exports.defaultSub = { | 82 exports.defaultSub = { |
83 type: 'get', | 83 type: 'get', |
84 child: 'pubsub', | 84 child: 'pubsub', |
85 ns: NS.PUBSUB, | 85 ns: NS.PUBSUB, |
86 pschild: 'default', | 86 child2: 'default', |
87 func: function(response, stanza, request) { | 87 func: function(response, stanza, request) { |
88 if (!config.enabled('retrieve-default-sub')) | 88 if (!config.enabled('retrieve-default-sub')) |
89 return makeError(response, errors.sub.default_options.default_subscription_configuration_retrieval_not_supported.n); | 89 return makeError(response, errors.sub.default_options.default_subscription_configuration_retrieval_not_supported.n); |
90 | 90 |
91 var nodeID = request.getAttribute('node'); | 91 var nodeID = request.getAttribute('node'); |