From 84b21dde6d4c495d216298a27bd010c73e9183d3 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Tue, 17 Sep 2024 11:38:18 +0200 Subject: [PATCH] Fix: moderation delay max value was not correctly handled. --- CHANGELOG.md | 1 + prosody-modules/mod_muc_moderation_delay/config.lib.lua | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaeb672b..2befddf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ If you use the "system Prosody", you should update to Prosody 0.12.4, and Lua 5. * Various type improvements. * Update dependencies. * Fix emoji picker colors and size. +* Fix: moderation delay max value was not correctly handled. ## 11.0.1 diff --git a/prosody-modules/mod_muc_moderation_delay/config.lib.lua b/prosody-modules/mod_muc_moderation_delay/config.lib.lua index 7fbb1af2..8bcd63dd 100644 --- a/prosody-modules/mod_muc_moderation_delay/config.lib.lua +++ b/prosody-modules/mod_muc_moderation_delay/config.lib.lua @@ -12,6 +12,9 @@ local function set_moderation_delay(room, delay) end if delay ~= nil then delay = assert(tonumber(delay), "Moderation delay is not a valid number"); + if delay > 60 then + delay = 60; + end if delay < 0 then delay = nil; end