aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
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
commit6a1f58031623c6e032a04adbaf95ffcf95b98156 (patch)
treee85a24bd533b209fdd68d93df79e40019a9b1ccd /plugins/muc
parent409cae1fc70dbb8adfc6d554b995198d0ba477e3 (diff)
downloadprosody-6a1f58031623c6e032a04adbaf95ffcf95b98156.tar.gz
prosody-6a1f58031623c6e032a04adbaf95ffcf95b98156.zip
MUC: Handle setting default history messages when history length is unset (thanks tmolitor)
Diffstat (limited to 'plugins/muc')
-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