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
2 changed files with 4 additions and 0 deletions

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