diff util/prosodyctl/check.lua @ 14048:f5d415d54064

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 20 Jan 2026 11:13:31 +0000
parents 76dba6ddf502 d8a30fdfbddd
children 64cd905cb1de
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Mon Jan 19 12:09:40 2026 +0100
+++ b/util/prosodyctl/check.lua	Tue Jan 20 11:13:31 2026 +0000
@@ -475,7 +475,6 @@
 			"websocket_get_response_text",
 		});
 		local config = configmanager.getconfig();
-		local global = api("*");
 		-- Check that we have any global options (caused by putting a host at the top)
 		if it.count(it.filter("log", pairs(config["*"]))) == 0 then
 			ok = false;
@@ -538,9 +537,8 @@
 		end
 
 		do -- Check for modules enabled both normally and as components
-			local modules = global:get_option_set("modules_enabled");
-			for host, options in enabled_hosts() do
-				local component_module = options.component_module;
+			for host in enabled_hosts() do
+				local modules, component_module = modulemanager.get_modules_for_host(host);
 				if component_module and modules:contains(component_module) then
 					print(("    mod_%s is enabled both in modules_enabled and as Component %q %q"):format(component_module, host, component_module));
 					print("    This means the service is enabled on all VirtualHosts as well as the Component.");
@@ -1559,7 +1557,7 @@
 		};
 
 		local recommended_component_modules = {
-			muc = { "muc_mam" };
+			muc = { "mam" };
 		};
 
 		local function print_feature_status(feature, host)
@@ -1694,7 +1692,7 @@
 				for _, component_module in ipairs({ suggested, alternate, ... }) do
 					found = host_components[component_module][1];
 					if found then
-						local enabled_component_modules = api(found):get_option_inherited_set("modules_enabled");
+						local enabled_component_modules = modulemanager.get_modules_for_host(found);
 						local recommended_mods = recommended_component_modules[component_module];
 						if recommended_mods then
 							local missing_mods = {};