Fix set_slow_mode_delay + Fix typo

This commit is contained in:
John Livingston 2024-02-14 11:43:57 +01:00
parent 68e51aec4b
commit f452c3529c
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC

View File

@ -42,13 +42,16 @@ local function set_slow_mode_delay(room, delay)
if delay and delay < 0 then if delay and delay < 0 then
delay = 0; delay = 0;
end end
if get_slow_mode_delay(room) == delay then return false; end
room._data.slow_mode_delay = delay; room._data.slow_mode_delay = delay;
return true; return true;
end end
-- Discovering support -- Discovering support
local function add_disco_form(event) local function add_disco_form(event)
table.insert(event.room, { table.insert(event.form, {
name = "muc#roominfo_slow_mode_delay"; name = "muc#roominfo_slow_mode_delay";
value = ""; value = "";
}); });