--- a/mod_mam_muc/mod_mam_muc.lua Sat Nov 18 00:37:42 2017 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua Sat Nov 18 00:46:44 2017 +0100
@@ -41,6 +41,7 @@
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 default_history_length = 20;
local max_history_length = module:get_option_number("max_history_messages", math.huge);
@@ -211,7 +212,7 @@
-- RSM stuff
local qset = rsm.get(query);
- local qmax = m_min(qset and qset.max or 20, 20);
+ local qmax = m_min(qset and qset.max or default_max_items, max_max_items);
local reverse = qset and qset.before or false;
local before, after = qset and qset.before, qset and qset.after;