plugins/muc/history.lib.lua
changeset 6240 641756a6a5f7
parent 6231 bc12a8253f94
child 6277 f2c9c36979b3
--- a/plugins/muc/history.lib.lua	Tue Apr 29 14:50:13 2014 -0400
+++ b/plugins/muc/history.lib.lua	Tue Apr 29 15:13:06 2014 -0400
@@ -11,7 +11,8 @@
 local datetime = require "util.datetime";
 local st = require "util.stanza";
 
-local default_history_length, max_history_length = 20, math.huge;
+local default_history_length = 20;
+local max_history_length = module:get_option_number("max_history_messages", math.huge);
 
 local function set_max_history_length(_max_history_length)
 	max_history_length = _max_history_length or math.huge;