aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/pubsub.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-10-20 17:31:24 +0200
committerKim Alvefur <zash@zash.se>2021-10-20 17:31:24 +0200
commit8b769c373d076ea0a678680ef187f83cd0e7d19d (patch)
tree85dc8ecc0113c5126835a69e61948e2727f4ff08 /plugins/mod_pubsub/pubsub.lib.lua
parent4b05d0f2402475fea608fd3e48a96364bc6da4f2 (diff)
downloadprosody-8b769c373d076ea0a678680ef187f83cd0e7d19d.tar.gz
prosody-8b769c373d076ea0a678680ef187f83cd0e7d19d.zip
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.
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua1
1 files changed, 1 insertions, 0 deletions
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";
};