diff mod_mam_muc/mod_mam_muc.lua @ 1430:18f5f1b13353

mod_mam_muc: Use max_history_length as default for "max_archive_query_results"
author daurnimator <quae@daurnimator.com>
date Thu, 05 Jun 2014 17:13:38 -0400
parents da9469e68dee
children 67c80abe742e
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua	Tue Jun 03 20:00:50 2014 +0200
+++ b/mod_mam_muc/mod_mam_muc.lua	Thu Jun 05 17:13:38 2014 -0400
@@ -23,8 +23,8 @@
 local time_now = os.time;
 local m_min = math.min;
 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse;
-local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50);
 local max_history_length = module:get_option_number("max_history_messages", 1000);
+local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", max_history_length);
 
 local log_all_rooms = module:get_option_boolean("muc_log_all_rooms", false);
 local log_by_default = module:get_option_boolean("muc_log_by_default", true);