Comparison

plugins/mod_csi_simple.lua @ 13213:50324f66ca2a

plugins: Use integer config API with interval specification where sensible Many of these fall into a few categories: - util.cache size, must be >= 1 - byte or item counts that logically can't be negative - port numbers that should be in 1..0xffff
author Kim Alvefur <zash@zash.se>
date Mon, 17 Jul 2023 01:38:54 +0200
parent 13209:c8d949cf6b09
comparison
equal deleted inserted replaced
13212:3e6e98cc63e9 13213:50324f66ca2a
10 local st = require "prosody.util.stanza"; 10 local st = require "prosody.util.stanza";
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_integer("csi_queue_size", 256, 1);
16 local resume_delay = module:get_option_period("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