Comparison

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
parent 1385:da9469e68dee
child 1519:67c80abe742e
comparison
equal deleted inserted replaced
1429:3f85aaca8282 1430:18f5f1b13353
21 21
22 local tostring = tostring; 22 local tostring = tostring;
23 local time_now = os.time; 23 local time_now = os.time;
24 local m_min = math.min; 24 local m_min = math.min;
25 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; 25 local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse;
26 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50);
27 local max_history_length = module:get_option_number("max_history_messages", 1000); 26 local max_history_length = module:get_option_number("max_history_messages", 1000);
27 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", max_history_length);
28 28
29 local log_all_rooms = module:get_option_boolean("muc_log_all_rooms", false); 29 local log_all_rooms = module:get_option_boolean("muc_log_all_rooms", false);
30 local log_by_default = module:get_option_boolean("muc_log_by_default", true); 30 local log_by_default = module:get_option_boolean("muc_log_by_default", true);
31 local advertise_archive = module:get_option_boolean("muc_log_advertise", true); 31 local advertise_archive = module:get_option_boolean("muc_log_advertise", true);
32 32