mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
This commit is contained in:
parent
903e945d09
commit
1987a7411f
18 changed files with 24 additions and 38 deletions
|
@ -8,7 +8,7 @@ local generate_identifier = require "prosody.util.id".short;
|
|||
|
||||
local token_store = module:open_store("auth_tokens", "keyval+");
|
||||
|
||||
local access_time_granularity = module:get_option_number("token_auth_access_time_granularity", 60);
|
||||
local access_time_granularity = module:get_option_period("token_auth_access_time_granularity", 60);
|
||||
|
||||
local function select_role(username, host, role_name)
|
||||
if not role_name then return end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue