diff mod_audit/mod_audit.lua @ 5710:15c1801e8901

mod_audit: Fix showing session details in module command The namespaced session element was not accounted for.
author Kim Alvefur <zash@zash.se>
date Mon, 13 Nov 2023 12:37:21 +0100
parents 0c9606770db1
children c782f220b3ee
line wrap: on
line diff
--- a/mod_audit/mod_audit.lua	Mon Nov 13 12:22:17 2023 +0100
+++ b/mod_audit/mod_audit.lua	Mon Nov 13 12:37:21 2023 +0100
@@ -271,8 +271,8 @@
 				source = entry.attr.source;
 				event_type = entry.attr.type:gsub("%-", " ");
 				username = user;
-				ip = entry:get_child_text("remote-ip");
-				location = entry:find("location@country");
+				ip = entry:find("{xmpp:prosody.im/audit}session/remote-ip#");
+				country = entry:find("{xmpp:prosody.im/audit}session/location@country");
 				note = entry:get_child_text("note");
 			}));
 		end