aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/history_redis.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-14 14:39:34 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-14 14:39:50 +0000
commit629f9ff70080f13a56056a7ecc2fa9ce611b4cf9 (patch)
tree8520d840d65d1c94712e59b847ee70964223b974 /src/plugins/lua/history_redis.lua
parent6c7258e2a58b835351a00fd8b3407b9655342051 (diff)
downloadrspamd-629f9ff70080f13a56056a7ecc2fa9ce611b4cf9.tar.gz
rspamd-629f9ff70080f13a56056a7ecc2fa9ce611b4cf9.zip
[Minor] Save unix time in redis history
Diffstat (limited to 'src/plugins/lua/history_redis.lua')
-rw-r--r--src/plugins/lua/history_redis.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua
index 18cc9b5d6..9f7046ca0 100644
--- a/src/plugins/lua/history_redis.lua
+++ b/src/plugins/lua/history_redis.lua
@@ -63,6 +63,9 @@ local function normalise_results(tbl, task)
tbl.messages = nil
tbl.urls = nil
+ local seconds = task:get_timeval()['tv_sec']
+ tbl.unix_time = seconds
+
tbl.subject = task:get_header('subject') or 'unknown'
end