mod_client_management: Fix error when called against host without this module
Previously:
prosody> user:clients("user@example.org")
| Result: 1
--- a/mod_client_management/mod_client_management.lua Wed Apr 26 11:55:55 2023 +0200
+++ b/mod_client_management/mod_client_management.lua Wed Apr 26 12:09:17 2023 +0200
@@ -409,8 +409,7 @@
local username, host = jid.split(user_jid);
local mod = prosody.hosts[host] and prosody.hosts[host].modules.client_management;
if not mod then
- print("EE: Host does not exist on this server, or does not have mod_client_management loaded");
- return 1;
+ return false, ("Host does not exist on this server, or does not have mod_client_management loaded");
end
local clients = mod.get_active_clients(username);