Mercurial > prosody-hg
diff plugins/muc/mod_muc.lua @ 14040:ce8ed69c4962 13.0
mod_muc: Inherit mod_mam if globally loaded
This will load mod_muc_mam for all MUC components if mod_mam is enabled
globally in the config file. This behaviour can be prevented by explicitly
disabling mod_mam and mod_muc_mam in the config, under the Component:
Component "conference.example.com" "muc"
-- Don't enable MAM on this MUC component:
modules_disabled = { "mam", "muc_mam" }
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 12 Jan 2026 17:46:32 +0000 |
| parents | c6010e1322aa |
| children | f5d415d54064 |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Mon Jan 12 17:44:21 2026 +0000 +++ b/plugins/muc/mod_muc.lua Mon Jan 12 17:46:32 2026 +0000 @@ -5,6 +5,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- +--% inherit_modules: mam -- Exposed functions: -- @@ -18,6 +19,7 @@ -- live_rooms() -> room -- shutdown_component() + if module:get_host_type() ~= "component" then error("MUC should be loaded as a component, please see https://prosody.im/doc/components", 0); end
