From 8b769c373d076ea0a678680ef187f83cd0e7d19d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 20 Oct 2021 17:31:24 +0200 Subject: mod_pubsub: Prevent max_items from being set to zero Disable persistence instead if no items should be persisted. XEP-0060 is not entirely clear on what either of those option really mean. --- plugins/mod_pubsub/pubsub.lib.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/mod_pubsub') diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index c5097a33..71900416 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -86,6 +86,7 @@ local node_config_form = dataform { type = "text-single"; datatype = "pubsub:integer-or-max"; name = "max_items"; + range_min = 1; var = "pubsub#max_items"; label = "Max # of items to persist"; }; -- cgit v1.2.3