Mercurial > prosody-modules
diff mod_client_management/mod_client_management.lua @ 5756:e199f33f7a2e
mod_client_management: Include session in the other new-client event too
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Dec 2023 11:18:57 +0100 |
parents | 3730992d0c7c |
children | 13094c707414 |
line wrap: on
line diff
--- a/mod_client_management/mod_client_management.lua Sat Dec 02 11:10:43 2023 +0100 +++ b/mod_client_management/mod_client_management.lua Sat Dec 02 11:18:57 2023 +0100 @@ -133,7 +133,7 @@ client_store:set_key(session.username, client_state.id, client_state); if is_new_client then - module:fire_event("client_management/new-client", { client = client_state }); + module:fire_event("client_management/new-client", { client = client_state; session = session }); end end); @@ -425,7 +425,7 @@ -- Command -module:once(function () +module:on_ready(function () local console_env = module:shared("/*/admin_shell/env"); if not console_env.user then return; end -- admin_shell probably not loaded