diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-29 22:33:22 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-05-29 22:33:22 +0200 |
commit | 0caeb4940ecc236f571c1fde10253ca1e3ee74fd (patch) | |
tree | e85a24bd533b209fdd68d93df79e40019a9b1ccd /plugins/muc/muc.lib.lua | |
parent | b6a654fdfc549d5ebf59ebe4a20fb77328313459 (diff) | |
download | prosody-0caeb4940ecc236f571c1fde10253ca1e3ee74fd.tar.gz prosody-0caeb4940ecc236f571c1fde10253ca1e3ee74fd.zip |
MUC: Handle setting default history messages when history length is unset (thanks tmolitor)
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-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 31c28df9..38eb980e 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -365,7 +365,7 @@ function room_mt:get_defaulthistorymessages() return self._data.default_history_messages or default_history_length; end function room_mt:set_defaulthistorymessages(number) - number = math.min(tonumber(number) or default_history_length, self._data.history_length); + number = math.min(tonumber(number) or default_history_length, self._data.history_length or default_history_length); if number == default_history_length then number = nil; end |