Fix: moderation delay max value was not correctly handled.
This commit is contained in:
parent
1b53a6ec2d
commit
84b21dde6d
@ -30,6 +30,7 @@ If you use the "system Prosody", you should update to Prosody 0.12.4, and Lua 5.
|
|||||||
* Various type improvements.
|
* Various type improvements.
|
||||||
* Update dependencies.
|
* Update dependencies.
|
||||||
* Fix emoji picker colors and size.
|
* Fix emoji picker colors and size.
|
||||||
|
* Fix: moderation delay max value was not correctly handled.
|
||||||
|
|
||||||
## 11.0.1
|
## 11.0.1
|
||||||
|
|
||||||
|
@ -12,6 +12,9 @@ local function set_moderation_delay(room, delay)
|
|||||||
end
|
end
|
||||||
if delay ~= nil then
|
if delay ~= nil then
|
||||||
delay = assert(tonumber(delay), "Moderation delay is not a valid number");
|
delay = assert(tonumber(delay), "Moderation delay is not a valid number");
|
||||||
|
if delay > 60 then
|
||||||
|
delay = 60;
|
||||||
|
end
|
||||||
if delay < 0 then
|
if delay < 0 then
|
||||||
delay = nil;
|
delay = nil;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user