Fix: moderation delay max value was not correctly handled.

This commit is contained in:
John Livingston 2024-09-17 11:38:18 +02:00
parent 1b53a6ec2d
commit 84b21dde6d
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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