Diff

plugins/muc/mod_muc.lua @ 13209:c8d949cf6b09

plugins: Switch to :get_option_period() for time range options Improves readability ("1 day" vs 86400) and centralizes validation.
author Kim Alvefur <zash@zash.se>
date Sun, 16 Jul 2023 20:49:33 +0200
parent 13170:082c7d856e61
child 13213:50324f66ca2a
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Sun Jul 16 21:04:42 2023 +0200
+++ b/plugins/muc/mod_muc.lua	Sun Jul 16 20:49:33 2023 +0200
@@ -389,7 +389,7 @@
 
 if module:get_option_boolean("muc_tombstones", true) then
 
-	local ttl = module:get_option_number("muc_tombstone_expiry", 86400 * 31);
+	local ttl = module:get_option_period("muc_tombstone_expiry", "31 days");
 
 	module:hook("muc-room-destroyed",function(event)
 		local room = event.room;