From 1e6c295b684a7b9519454a72d9d0e04e8bc72d1b Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 7 Mar 2018 15:05:20 +0100 Subject: mod_mam: Add an option for whether to include 'total' counts by default in queries --- plugins/mod_mam/mod_mam.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index a8b3aad2..781a9e62 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -52,7 +52,7 @@ if archive.name == "null" or not archive.find then archive = module:require "fallback_archive"; end -local use_total = true; +local use_total = module:get_option_boolean("mam_include_total", true); local cleanup; @@ -384,7 +384,7 @@ else module:log("debug", "Archive expiry disabled"); -- Don't ask the backend to count the potentially unbounded number of items, -- it'll get slow. - use_total = false; + use_total = module:get_option_boolean("mam_include_total", false); end -- Stanzas sent by local clients -- cgit v1.2.3