diff --git a/prosody-modules/mod_muc_slow_mode/mod_muc_slow_mode.lua b/prosody-modules/mod_muc_slow_mode/mod_muc_slow_mode.lua index ff7433a2..0060ba24 100644 --- a/prosody-modules/mod_muc_slow_mode/mod_muc_slow_mode.lua +++ b/prosody-modules/mod_muc_slow_mode/mod_muc_slow_mode.lua @@ -42,13 +42,16 @@ local function set_slow_mode_delay(room, delay) if delay and delay < 0 then delay = 0; end + + if get_slow_mode_delay(room) == delay then return false; end + room._data.slow_mode_delay = delay; return true; end -- Discovering support local function add_disco_form(event) - table.insert(event.room, { + table.insert(event.form, { name = "muc#roominfo_slow_mode_delay"; value = ""; });