Diff

plugins/mod_pubsub/pubsub.lib.lua @ 11855:8890eaa69446

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.
author Kim Alvefur <zash@zash.se>
date Wed, 20 Oct 2021 17:31:24 +0200
parent 11854:b605cbd5f13b
child 11882:c3bd71227e17
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua	Tue Oct 19 18:11:50 2021 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Wed Oct 20 17:31:24 2021 +0200
@@ -86,6 +86,7 @@
 		type = "text-single";
 		datatype = "pubsub:integer-or-max";
 		name = "max_items";
+		range_min = 1;
 		var = "pubsub#max_items";
 		label = "Max # of items to persist";
 	};