Software /
code /
prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 6438:b1c40054b59d
mod_pubsub: Add support for node configuration
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Sep 2014 01:46:17 +0200 |
parent | 6434:382e03a40dd2 |
child | 6440:9619809bf50b |
comparison
equal
deleted
inserted
replaced
6437:3f1f11dfdf10 | 6438:b1c40054b59d |
---|---|
62 publish = { "publish", autocreate_on_publish and "auto-create" }; | 62 publish = { "publish", autocreate_on_publish and "auto-create" }; |
63 delete = { "delete-nodes" }; | 63 delete = { "delete-nodes" }; |
64 get_items = { "retrieve-items" }; | 64 get_items = { "retrieve-items" }; |
65 add_subscription = { "subscribe" }; | 65 add_subscription = { "subscribe" }; |
66 get_subscriptions = { "retrieve-subscriptions" }; | 66 get_subscriptions = { "retrieve-subscriptions" }; |
67 set_configure = { "config-node" }; | |
67 }; | 68 }; |
68 | 69 |
69 local function add_disco_features_from_service(service) | 70 local function add_disco_features_from_service(service) |
70 for method, features in pairs(feature_map) do | 71 for method, features in pairs(feature_map) do |
71 if service[method] then | 72 if service[method] then |
193 create = true; | 194 create = true; |
194 publish = true; | 195 publish = true; |
195 retract = true; | 196 retract = true; |
196 delete = true; | 197 delete = true; |
197 get_nodes = true; | 198 get_nodes = true; |
199 configure = true; | |
198 | 200 |
199 subscribe = true; | 201 subscribe = true; |
200 unsubscribe = true; | 202 unsubscribe = true; |
201 get_subscription = true; | 203 get_subscription = true; |
202 get_subscriptions = true; | 204 get_subscriptions = true; |
213 | 215 |
214 set_affiliation = true; | 216 set_affiliation = true; |
215 }; | 217 }; |
216 }; | 218 }; |
217 | 219 |
220 node_config_form = require"util.dataforms".new { | |
221 { | |
222 type = "hidden"; | |
223 name = "FORM_TYPE"; | |
224 value = "http://jabber.org/protocol/pubsub#node_config"; | |
225 }; | |
226 }; | |
227 | |
218 autocreate_on_publish = autocreate_on_publish; | 228 autocreate_on_publish = autocreate_on_publish; |
219 autocreate_on_subscribe = autocreate_on_subscribe; | 229 autocreate_on_subscribe = autocreate_on_subscribe; |
220 | 230 |
221 broadcaster = simple_broadcast; | 231 broadcaster = simple_broadcast; |
222 get_affiliation = get_affiliation; | 232 get_affiliation = get_affiliation; |