Mercurial > prosody-modules
diff mod_http_admin_api/mod_http_admin_api.lua @ 6236:4b52d579bc70
mod_http_admin_api: Switch from mod_lastlog2 to mod_account_activity
The latter is included in Prosody 13.0+.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 02 Jun 2025 12:59:32 +0100 |
| parents | 095030677ae6 |
| children | 5571c75a4fed |
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua Sat May 31 16:59:35 2025 +0200 +++ b/mod_http_admin_api/mod_http_admin_api.lua Mon Jun 02 12:59:32 2025 +0100 @@ -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); };
