Mercurial > prosody-modules
diff mod_audit/mod_audit.lua @ 5317:0091b7de2763
mod_audit: Allow caller to specify time of the event
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 07 Apr 2023 12:00:06 +0100 |
parents | e3a3a6c86a9f |
children | c5ecfb06afde |
line wrap: on
line diff
--- a/mod_audit/mod_audit.lua Fri Apr 07 11:38:46 2023 +0200 +++ b/mod_audit/mod_audit.lua Fri Apr 07 12:00:06 2023 +0100 @@ -111,7 +111,7 @@ end end - local id, err = stores[host]:append(nil, nil, stanza, time_now(), user_key); + local id, err = stores[host]:append(nil, nil, stanza, extra and extra.timestamp or time_now(), user_key); if err then module:log("error", "failed to persist audit event: %s", err); return