Software /
code /
prosody
Comparison
plugins/mod_csi_simple.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 | 13092:bc46cfe7c037 |
child | 13213:50324f66ca2a |
comparison
equal
deleted
inserted
replaced
13208:a7c6ea1c5308 | 13209:c8d949cf6b09 |
---|---|
11 local dt = require "prosody.util.datetime"; | 11 local dt = require "prosody.util.datetime"; |
12 local filters = require "prosody.util.filters"; | 12 local filters = require "prosody.util.filters"; |
13 local timer = require "prosody.util.timer"; | 13 local timer = require "prosody.util.timer"; |
14 | 14 |
15 local queue_size = module:get_option_number("csi_queue_size", 256); | 15 local queue_size = module:get_option_number("csi_queue_size", 256); |
16 local resume_delay = module:get_option_number("csi_resume_inactive_delay", 5); | 16 local resume_delay = module:get_option_period("csi_resume_inactive_delay", 5); |
17 | 17 |
18 local important_payloads = module:get_option_set("csi_important_payloads", { }); | 18 local important_payloads = module:get_option_set("csi_important_payloads", { }); |
19 | 19 |
20 function is_important(stanza) --> boolean, reason: string | 20 function is_important(stanza) --> boolean, reason: string |
21 if stanza == " " then | 21 if stanza == " " then |