# HG changeset patch # User Kim Alvefur # Date 1527626002 -7200 # Node ID dcd53a565c01231c0dd02bd7505e578c68252f87 # Parent 6d4b0895f76d794a9b8a3c11e8afcb51ed0051c7 MUC: Handle setting default history messages when history length is unset (thanks tmolitor) diff -r 6d4b0895f76d -r dcd53a565c01 plugins/muc/muc.lib.lua --- 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