diff plugins/mod_muc_mam.lua @ 14109:3d1ac10a7901

mod_muc_mam: Honour 'archive_expires_after' if 'muc_log_expires_after' not set (thanks balejk) This allows for a more consistent setup, by setting archive_expires_after once in the global section.
author Matthew Wild <mwild1@gmail.com>
date Tue, 24 Mar 2026 12:51:01 +0000
parents 081f8f9b3b81
children
line wrap: on
line diff
--- a/plugins/mod_muc_mam.lua	Sun Mar 22 15:12:41 2026 +0100
+++ b/plugins/mod_muc_mam.lua	Tue Mar 24 12:51:01 2026 +0000
@@ -34,7 +34,7 @@
 local timestamp, datestamp = import("prosody.util.datetime", "datetime", "date");
 local default_max_items, max_max_items = 20, module:get_option_integer("max_archive_query_results", 50, 0);
 
-local cleanup_after = module:get_option_period("muc_log_expires_after", "1w");
+local cleanup_after = module:get_option_period("muc_log_expires_after", module:get_option("archive_expires_after", "1w"));
 
 local default_history_length = 20;
 local max_history_length = module:get_option_integer("max_history_messages", math.huge, 0);