diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-13 21:07:00 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-13 21:07:00 +0100 |
commit | ea1662404fb68cd6e61eb835a84e3182e328b513 (patch) | |
tree | ebe8f3bc2d99599ca47eef4c8d1df18da09d6f26 | |
parent | 1e73eea16196b651a0b530f1cc8709a1fe308ebf (diff) | |
download | prosody-ea1662404fb68cd6e61eb835a84e3182e328b513.tar.gz prosody-ea1662404fb68cd6e61eb835a84e3182e328b513.zip |
muc.lib: Fix for traceback when no history length is set for the room
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
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) |