Software /
code /
prosody-modules
Changeset
5372:2d8076577e14
mod_client_management: Fix error when called against host without this module
Previously:
prosody> user:clients("user@example.org")
| Result: 1
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Apr 2023 12:09:17 +0200 |
parents | 5371:b2d51c6ae89a |
children | 5373:93d6ed7dc779 |
files | mod_client_management/mod_client_management.lua |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);