Diff

plugins/mod_pubsub/mod_pubsub.lua @ 6442:0f4025abbe8f

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 28 Sep 2014 01:56:22 +0200
parent 5973:905b4fd863b4
parent 6441:bcb1ea9047d3
child 6450:25d86b0f2147
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Sat Sep 27 19:00:09 2014 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Sun Sep 28 01:56:22 2014 +0200
@@ -64,6 +64,8 @@
 	get_items = { "retrieve-items" };
 	add_subscription = { "subscribe" };
 	get_subscriptions = { "retrieve-subscriptions" };
+	set_configure = { "config-node" };
+	get_default = { "retrieve-default" };
 };
 
 local function add_disco_features_from_service(service)
@@ -195,6 +197,7 @@
 				retract = true;
 				delete = true;
 				get_nodes = true;
+				configure = true;
 
 				subscribe = true;
 				unsubscribe = true;
@@ -215,6 +218,19 @@
 			};
 		};
 
+		node_config_form = require"util.dataforms".new {
+			{
+				type = "hidden";
+				name = "FORM_TYPE";
+				value = "http://jabber.org/protocol/pubsub#node_config";
+			};
+			{
+				type = "text-single";
+				name = "pubsub#max_items";
+				label = "Max # of items to persist";
+			};
+		};
+
 		autocreate_on_publish = autocreate_on_publish;
 		autocreate_on_subscribe = autocreate_on_subscribe;