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