aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-29 22:33:22 +0200
committerKim Alvefur <zash@zash.se>2018-05-29 22:33:22 +0200
commit5345f3e58e50221007d29ae84484f2028bf119dc (patch)
treee85a24bd533b209fdd68d93df79e40019a9b1ccd /plugins
parentc14bb5546d336d4119bdb2a272db2b4de4d156f5 (diff)
downloadprosody-5345f3e58e50221007d29ae84484f2028bf119dc.tar.gz
prosody-5345f3e58e50221007d29ae84484f2028bf119dc.zip
MUC: Handle setting default history messages when history length is unset (thanks tmolitor)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua2
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