From 1987a7411f6aab1b0534ef23dc8797362eae1076 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 16 Jul 2023 20:49:33 +0200 Subject: plugins: Switch to :get_option_period() for time range options Improves readability ("1 day" vs 86400) and centralizes validation. --- plugins/mod_invites.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_invites.lua') diff --git a/plugins/mod_invites.lua b/plugins/mod_invites.lua index 11f71544..14f710c7 100644 --- a/plugins/mod_invites.lua +++ b/plugins/mod_invites.lua @@ -5,7 +5,7 @@ local jid_node = require "prosody.util.jid".node; local jid_split = require "prosody.util.jid".split; local argparse = require "prosody.util.argparse"; -local default_ttl = module:get_option_number("invite_expiry", 86400 * 7); +local default_ttl = module:get_option_period("invite_expiry", "1 week"); local token_storage; if prosody.process_type == "prosody" or prosody.shutdown then -- cgit v1.2.3