mod_muc/muc.lib: Fall back to default_history_length if no length in config
authorMatthew Wild <mwild1@gmail.com>
Sat, 28 Apr 2012 18:36:03 +0100
changeset 4785 36234dc4b177
parent 4784 e10b623ccecb
child 4786 ad6d4ab40b20
mod_muc/muc.lib: Fall back to default_history_length if no length in config
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Sat Apr 28 16:41:35 2012 +0100
+++ b/plugins/muc/muc.lib.lua	Sat Apr 28 18:36:03 2012 +0100
@@ -336,7 +336,7 @@
 	return self._data.changesubject;
 end
 function room_mt:get_historylength()
-	return self._data.history_length
+	return self._data.history_length or default_history_length;
 end
 function room_mt:set_historylength(length)
 	if tonumber(length) == nil then