Mercurial > prosody-modules
changeset 4947:cc14bfec209b
mod_reload_modules: Be aware of component module (thanks Menel)
Without this, the component module is seen as a module that is loaded
but not configured, and is thus unloaded
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 May 2022 14:48:18 +0200 |
parents | fa415cd9eeca |
children | b171ddf1bc3e |
files | mod_reload_modules/mod_reload_modules.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_reload_modules/mod_reload_modules.lua Fri May 20 08:41:45 2022 -0400 +++ b/mod_reload_modules/mod_reload_modules.lua Sat May 21 14:48:18 2022 +0200 @@ -8,6 +8,12 @@ return; end local configured_modules = module:get_option_inherited_set("modules_enabled", {}); + local component_module = module:get_option_string("component_module"); + if component_module then + -- Ensure awareness of the component module so that it is not unloaded + configured_modules:add(component_module); + end + -- ignore removed hosts if not prosody.hosts[module.host] then module:log("warn", "Ignoring host %s: host was removed...", module.host);