# HG changeset patch # User Kim Alvefur # Date 1510962404 -3600 # Node ID d65868fed77a8910783a9b3a84c57544efe7d0b6 # Parent 92f6f82397c9b200249a569736bbd6c6e6dd4c09 mod_mam_muc: Copy max_archive_query_results option from mod_mam diff -r 92f6f82397c9 -r d65868fed77a mod_mam_muc/mod_mam_muc.lua --- 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;