mod_pep_plus: Add node config form
authorKim Alvefur <zash@zash.se>
Sun, 28 Sep 2014 00:00:09 +0000 (02:00 +0200)
committerKim Alvefur <zash@zash.se>
Sun, 28 Sep 2014 00:00:09 +0000 (02:00 +0200)
plugins/mod_pep_plus.lua

index 351b0e3cd6c812063fe5b91f41066a6367db3504..de0f92b218a2f75eeff90ef06cb8301d317592c1 100644 (file)
@@ -133,6 +133,7 @@ function get_pep_service(name)
                                retract = true;
                                delete = true;
                                get_nodes = true;
+                               configure = true;
 
                                subscribe = true;
                                unsubscribe = true;
@@ -153,6 +154,19 @@ function get_pep_service(name)
                        };
                };
 
+               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;