Mercurial > prosody-hg
changeset 14039:4421dcb755b5 13.0
mod_mam: Automatically load mod_muc_mam if loaded on a MUC component
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 12 Jan 2026 17:44:21 +0000 |
| parents | 1a2691bd50bd |
| children | ce8ed69c4962 |
| files | plugins/mod_mam/mod_mam.lua |
| diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua Mon Jan 12 17:17:51 2026 +0000 +++ b/plugins/mod_mam/mod_mam.lua Mon Jan 12 17:44:21 2026 +0000 @@ -9,6 +9,11 @@ -- XEP-0313: Message Archive Management for Prosody -- +if module:get_host_type() == "component" and module:get_option_string("component_module") == "muc" then + module:depends("muc_mam"); + return; +end + local xmlns_mam = "urn:xmpp:mam:2"; local xmlns_mam_ext = "urn:xmpp:mam:2#extended"; local xmlns_delay = "urn:xmpp:delay";
