Diff

plugins/muc/history.lib.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 12977:74b9e05af71e
line wrap: on
line diff
--- a/plugins/muc/history.lib.lua	Mon Jul 17 00:37:44 2023 +0200
+++ b/plugins/muc/history.lib.lua	Mon Jul 17 01:38:54 2023 +0200
@@ -12,7 +12,7 @@
 local st = require "prosody.util.stanza";
 
 local default_history_length = 20;
-local max_history_length = module:get_option_number("max_history_messages", math.huge);
+local max_history_length = module:get_option_integer("max_history_messages", math.huge, 0);
 
 local function set_max_history_length(_max_history_length)
 	max_history_length = _max_history_length or math.huge;