Changeset

6443:f4403c270ea2

mod_pep_plus: Add node config form
author Kim Alvefur <zash@zash.se>
date Sun, 28 Sep 2014 02:00:09 +0200
parents 6442:0f4025abbe8f
children 6444:aab509a9d0ba
files plugins/mod_pep_plus.lua
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pep_plus.lua	Sun Sep 28 01:56:22 2014 +0200
+++ b/plugins/mod_pep_plus.lua	Sun Sep 28 02:00:09 2014 +0200
@@ -133,6 +133,7 @@
 				retract = true;
 				delete = true;
 				get_nodes = true;
+				configure = true;
 
 				subscribe = true;
 				unsubscribe = true;
@@ -153,6 +154,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 = true;
 		autocreate_on_subscribe = true;