diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-07-14 19:48:01 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-07-14 19:48:01 +0500 |
commit | ad0a36e8d33d776f3909c724015ab1a1892ddfed (patch) | |
tree | eec9ffed7e82cb2508f7914e28ac2834c3043aa0 /plugins/muc/muc.lib.lua | |
parent | 1c51f969daf9fc5e258c548073c2600537a66b47 (diff) | |
download | prosody-ad0a36e8d33d776f3909c724015ab1a1892ddfed.tar.gz prosody-ad0a36e8d33d776f3909c724015ab1a1892ddfed.zip |
MUC: Fixed a traceback introduced in hg:bdc325ce9fbc.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index ab129287..e679f9fe 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -136,7 +136,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) @@ -979,7 +979,7 @@ function _M.new_room(jid, config) _occupants = {}; _data = { whois = 'moderators'; - history_length = (config and config.history_length) or default_history_length; + history_length = (config and config.history_length); }; _affiliations = {}; }, room_mt); |