From 71ad48095d92dd52a415eef499da32f8c27bb7fe Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 17 Jul 2023 01:38:54 +0200 Subject: 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 --- plugins/mod_tombstones.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_tombstones.lua') diff --git a/plugins/mod_tombstones.lua b/plugins/mod_tombstones.lua index 4f3b167a..e0f1a827 100644 --- a/plugins/mod_tombstones.lua +++ b/plugins/mod_tombstones.lua @@ -8,7 +8,7 @@ local st = require "prosody.util.stanza"; -- Using a map store as key-value store so that removal of all user data -- does not also remove the tombstone, which would defeat the point local graveyard = module:open_store(nil, "map"); -local graveyard_cache = require "prosody.util.cache".new(module:get_option_number("tombstone_cache_size", 1024)); +local graveyard_cache = require "prosody.util.cache".new(module:get_option_integer("tombstone_cache_size", 1024, 1)); local ttl = module:get_option_period("user_tombstone_expiry", nil); -- Keep tombstones forever by default -- cgit v1.2.3