Software /
code /
prosody-modules
Changeset
5736:dde83f6043e6
mod_audit_register: Include hostpart with audit events here too
mod_audit seems to expect this to be JIDs, not bare usernames.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 13 Nov 2023 17:23:49 +0100 |
parents | 5735:b357ff3d0c8a |
children | 5737:c77010f25b14 |
files | mod_audit_register/mod_audit_register.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_audit_register/mod_audit_register.lua Mon Nov 13 17:14:09 2023 +0100 +++ b/mod_audit_register/mod_audit_register.lua Mon Nov 13 17:23:49 2023 +0100 @@ -1,6 +1,7 @@ module:depends("audit"); -- luacheck: read globals module.audit +local jid = require "util.jid"; local st = require "util.stanza"; module:hook("user-registered", function(event) @@ -16,7 +17,7 @@ } )) end - module:audit(event.username, "user-registered", { + module:audit(jid.join(event.username, module.host), "user-registered", { session = session, custom = custom, });