From 6a1f58031623c6e032a04adbaf95ffcf95b98156 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 29 May 2018 22:33:22 +0200 Subject: MUC: Handle setting default history messages when history length is unset (thanks tmolitor) --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.3