plugins: Switch to :get_option_period() for time range options

Improves readability ("1 day" vs 86400) and centralizes validation.
This commit is contained in:
Kim Alvefur 2023-07-16 20:49:33 +02:00
parent 903e945d09
commit 1987a7411f
18 changed files with 24 additions and 38 deletions

View file

@ -13,7 +13,7 @@ local filters = require "prosody.util.filters";
local timer = require "prosody.util.timer";
local queue_size = module:get_option_number("csi_queue_size", 256);
local resume_delay = module:get_option_number("csi_resume_inactive_delay", 5);
local resume_delay = module:get_option_period("csi_resume_inactive_delay", 5);
local important_payloads = module:get_option_set("csi_important_payloads", { });