Changeset

6195:886c985ece61

mod_lastlog2: Skip initializing internal API (and storage) in prosodyctl Initializing storage in the global context under prosodyctl causes the module.command to fail to execute because the storage module has already been loaded. Introduced in 7b722955c59b
author Kim Alvefur <zash@zash.se>
date Sat, 08 Feb 2025 14:12:18 +0100
parents 6194:3e7fe14921d0
children 6196:1447f076c970
files mod_lastlog2/mod_lastlog2.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_lastlog2/mod_lastlog2.lua	Thu Feb 06 17:07:00 2025 +0000
+++ b/mod_lastlog2/mod_lastlog2.lua	Sat Feb 08 14:12:18 2025 +0100
@@ -47,7 +47,7 @@
 	end);
 end
 
-do
+if module.host ~= "*" then
 	local user_sessions = prosody.hosts[module.host].sessions;
 	local kv_store = module:open_store();
 	function get_last_active(username) --luacheck: ignore 131/get_last_active