Diff

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
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Sun Sep 28 01:45:59 2014 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Sun Sep 28 01:46:17 2014 +0200
@@ -64,6 +64,7 @@
 	get_items = { "retrieve-items" };
 	add_subscription = { "subscribe" };
 	get_subscriptions = { "retrieve-subscriptions" };
+	set_configure = { "config-node" };
 };
 
 local function add_disco_features_from_service(service)
@@ -195,6 +196,7 @@
 				retract = true;
 				delete = true;
 				get_nodes = true;
+				configure = true;
 
 				subscribe = true;
 				unsubscribe = true;
@@ -215,6 +217,14 @@
 			};
 		};
 
+		node_config_form = require"util.dataforms".new {
+			{
+				type = "hidden";
+				name = "FORM_TYPE";
+				value = "http://jabber.org/protocol/pubsub#node_config";
+			};
+		};
+
 		autocreate_on_publish = autocreate_on_publish;
 		autocreate_on_subscribe = autocreate_on_subscribe;