aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-13 21:07:00 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-13 21:07:00 +0100
commitd61c6b1760b28051f551acd69a1f18962133bcb0 (patch)
treeebe8f3bc2d99599ca47eef4c8d1df18da09d6f26
parent417defb2ede49f42dd326988eb10e9a50d8db77e (diff)
downloadprosody-d61c6b1760b28051f551acd69a1f18962133bcb0.tar.gz
prosody-d61c6b1760b28051f551acd69a1f18962133bcb0.zip
muc.lib: Fix for traceback when no history length is set for the room
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 0203df26..556916f2 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -135,7 +135,7 @@ function room_mt:broadcast_message(stanza, historic)
stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated)
local entry = { stanza = stanza, stamp = stamp };
t_insert(history, entry);
- while #history > self._data.history_length do t_remove(history, 1) end
+ while #history > (self._data.history_length or default_history_length) do t_remove(history, 1) end
end
end
function room_mt:broadcast_except_nick(stanza, nick)