mod_audit/mod_audit.lua
changeset 5321 0091b7de2763
parent 5303 e3a3a6c86a9f
child 5322 c5ecfb06afde
--- 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