Software /
code /
prosody
Diff
plugins/mod_pubsub/mod_pubsub.lua @ 13213:50324f66ca2a
plugins: Use integer config API with interval specification where sensible
Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 17 Jul 2023 01:38:54 +0200 |
parent | 13202:173038306750 |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Mon Jul 17 00:37:44 2023 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Mon Jul 17 01:38:54 2023 +0200 @@ -39,7 +39,7 @@ -- get(node_name) -- users(): iterator over (node_name) -local max_max_items = module:get_option_number("pubsub_max_items", 256); +local max_max_items = module:get_option_integer("pubsub_max_items", 256, 1); local function tonumber_max_items(n) if n == "max" then