aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_mam
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-03-07 15:05:20 +0100
committerKim Alvefur <zash@zash.se>2018-03-07 15:05:20 +0100
commit1e6c295b684a7b9519454a72d9d0e04e8bc72d1b (patch)
tree06f0dc51592a49570f0f7e7b5ffeb526ab87a762 /plugins/mod_mam
parent07c0bc5d5413f254fce624bba798a5e36b434670 (diff)
downloadprosody-1e6c295b684a7b9519454a72d9d0e04e8bc72d1b.tar.gz
prosody-1e6c295b684a7b9519454a72d9d0e04e8bc72d1b.zip
mod_mam: Add an option for whether to include 'total' counts by default in queries
Diffstat (limited to 'plugins/mod_mam')
-rw-r--r--plugins/mod_mam/mod_mam.lua4
1 files changed, 2 insertions, 2 deletions
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