aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_turn_external.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-07-16 20:49:33 +0200
committerKim Alvefur <zash@zash.se>2023-07-16 20:49:33 +0200
commit1987a7411f6aab1b0534ef23dc8797362eae1076 (patch)
tree47c52d7b27c3b76cb1356f1a512105f1df2e8592 /plugins/mod_turn_external.lua
parent903e945d09ffd94ebf3f08b6c5092a56ad484348 (diff)
downloadprosody-1987a7411f6aab1b0534ef23dc8797362eae1076.tar.gz
prosody-1987a7411f6aab1b0534ef23dc8797362eae1076.zip
plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
Diffstat (limited to 'plugins/mod_turn_external.lua')
-rw-r--r--plugins/mod_turn_external.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_turn_external.lua b/plugins/mod_turn_external.lua
index 2009002a..8d1d4662 100644
--- a/plugins/mod_turn_external.lua
+++ b/plugins/mod_turn_external.lua
@@ -4,7 +4,7 @@ local secret = module:get_option_string("turn_external_secret");
local host = module:get_option_string("turn_external_host", module.host);
local user = module:get_option_string("turn_external_user");
local port = module:get_option_number("turn_external_port", 3478);
-local ttl = module:get_option_number("turn_external_ttl", 86400);
+local ttl = module:get_option_period("turn_external_ttl", "1 day");
local tcp = module:get_option_boolean("turn_external_tcp", false);
local tls_port = module:get_option_number("turn_external_tls_port");