Diff

mod_http_admin_api/mod_http_admin_api.lua @ 6309:342f88e8d522 draft default tip

Merge update
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Sun, 15 Jun 2025 01:08:46 +0700
parent 6280:4b52d579bc70
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua	Sun Jun 01 21:32:49 2025 +0700
+++ b/mod_http_admin_api/mod_http_admin_api.lua	Sun Jun 15 01:08:46 2025 +0700
@@ -15,7 +15,7 @@
 local tokens = module:depends("tokenauth");
 local mod_pep = module:depends("pep");
 local mod_groups = module:depends("groups_internal");
-local mod_lastlog2 = module:depends("lastlog2");
+local mod_account_activity = module:depends("account_activity");
 
 local push_errors = module:shared("cloud_notify/push_errors");
 
@@ -30,8 +30,6 @@
 local xmlns_pubsub = "http://jabber.org/protocol/pubsub";
 local xmlns_nick = "http://jabber.org/protocol/nick";
 
-assert(mod_lastlog2.get_last_active, "Newer version of mod_lastlog2 is required to use this module");
-
 local deleted_users = module:open_store("accounts_cleanup");
 
 local function check_credentials(request)
@@ -242,7 +240,7 @@
 		secondary_roles = secondary_roles;
 		roles = legacy_roles; -- COMPAT w/0.12
 		enabled = enabled;
-		last_active = mod_lastlog2.get_last_active(username);
+		last_active = mod_account_activity.get_last_active(username);
 		deletion_request = not enabled and deleted_users:get(username) or nil;
 		avatar_info = get_user_avatar_info(username);
 	};