Mercurial > prosody-hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 14108:8e9ce4f01e2e | 14109:3d1ac10a7901 |
|---|---|
| 32 local time_now = require "prosody.util.time".now; | 32 local time_now = require "prosody.util.time".now; |
| 33 local m_min = math.min; | 33 local m_min = math.min; |
| 34 local timestamp, datestamp = import("prosody.util.datetime", "datetime", "date"); | 34 local timestamp, datestamp = import("prosody.util.datetime", "datetime", "date"); |
| 35 local default_max_items, max_max_items = 20, module:get_option_integer("max_archive_query_results", 50, 0); | 35 local default_max_items, max_max_items = 20, module:get_option_integer("max_archive_query_results", 50, 0); |
| 36 | 36 |
| 37 local cleanup_after = module:get_option_period("muc_log_expires_after", "1w"); | 37 local cleanup_after = module:get_option_period("muc_log_expires_after", module:get_option("archive_expires_after", "1w")); |
| 38 | 38 |
| 39 local default_history_length = 20; | 39 local default_history_length = 20; |
| 40 local max_history_length = module:get_option_integer("max_history_messages", math.huge, 0); | 40 local max_history_length = module:get_option_integer("max_history_messages", math.huge, 0); |
| 41 | 41 |
| 42 local function get_historylength(room) | 42 local function get_historylength(room) |
