Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 8839:dcd53a565c01
MUC: Handle setting default history messages when history length is unset (thanks tmolitor)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 29 May 2018 22:33:22 +0200 |
parent | 8838:6d4b0895f76d |
child | 8842:463505cc75d5 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Thu May 17 17:12:07 2018 +0200 +++ b/plugins/muc/muc.lib.lua Tue May 29 22:33:22 2018 +0200 @@ -365,7 +365,7 @@ 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