Mercurial > prosody-modules
comparison mod_audit_register/mod_audit_register.lua @ 5713: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 | 08dea42a302a |
children | b4607c5dfcac |
comparison
equal
deleted
inserted
replaced
5712:b357ff3d0c8a | 5713:dde83f6043e6 |
---|---|
1 module:depends("audit"); | 1 module:depends("audit"); |
2 -- luacheck: read globals module.audit | 2 -- luacheck: read globals module.audit |
3 | 3 |
4 local jid = require "util.jid"; | |
4 local st = require "util.stanza"; | 5 local st = require "util.stanza"; |
5 | 6 |
6 module:hook("user-registered", function(event) | 7 module:hook("user-registered", function(event) |
7 local session = event.session; | 8 local session = event.session; |
8 local custom = {}; | 9 local custom = {}; |
14 xmlns = "xmpp:prosody.im/audit", | 15 xmlns = "xmpp:prosody.im/audit", |
15 token = invite.token, | 16 token = invite.token, |
16 } | 17 } |
17 )) | 18 )) |
18 end | 19 end |
19 module:audit(event.username, "user-registered", { | 20 module:audit(jid.join(event.username, module.host), "user-registered", { |
20 session = session, | 21 session = session, |
21 custom = custom, | 22 custom = custom, |
22 }); | 23 }); |
23 end); | 24 end); |