mod_audit: Fix showing session details in module command
authorKim Alvefur <zash@zash.se>
Mon, 13 Nov 2023 12:37:21 +0100
changeset 5714 15c1801e8901
parent 5713 0c9606770db1
child 5715 c782f220b3ee
mod_audit: Fix showing session details in module command The namespaced session element was not accounted for.
mod_audit/mod_audit.lua
--- 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