Mercurial > psgxs
comparison modules/mod_subscribe.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 |
---|---|
8 // SECTION 6.1: Subscribe to a Node | 8 // SECTION 6.1: Subscribe to a Node |
9 exports.subscribe = { | 9 exports.subscribe = { |
10 type: 'set', | 10 type: 'set', |
11 child: 'pubsub', | 11 child: 'pubsub', |
12 ns: NS.PUBSUB, | 12 ns: NS.PUBSUB, |
13 pschild: 'subscribe', | 13 child2: 'subscribe', |
14 func: function(response, stanza, request, to) { | 14 func: function(response, stanza, request, to) { |
15 if (!config.enabled('subscribe')) | 15 if (!config.enabled('subscribe')) |
16 return makeError(response, errors.sub.subscribe.not_supported.n); | 16 return makeError(response, errors.sub.subscribe.not_supported.n); |
17 | 17 |
18 var nodeID = request.getAttribute('node'); | 18 var nodeID = request.getAttribute('node'); |
102 // SECTION 6.2: Unsubscribe from a Node | 102 // SECTION 6.2: Unsubscribe from a Node |
103 exports.unsubscribe = { | 103 exports.unsubscribe = { |
104 type: 'set', | 104 type: 'set', |
105 child: 'pubsub', | 105 child: 'pubsub', |
106 ns: NS.PUBSUB, | 106 ns: NS.PUBSUB, |
107 pschild: 'unsubscribe', | 107 child2: 'unsubscribe', |
108 func: function(response, stanza, request) { | 108 func: function(response, stanza, request) { |
109 if (!config.enabled('subscribe')) | 109 if (!config.enabled('subscribe')) |
110 return makeError(response, errors.sub.subscribe.not_supported.n); | 110 return makeError(response, errors.sub.subscribe.not_supported.n); |
111 | 111 |
112 var nodeID = request.getAttribute('node'); | 112 var nodeID = request.getAttribute('node'); |