aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/history_redis.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua/history_redis.lua')
-rw-r--r--src/plugins/lua/history_redis.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua
index c203d354b..d4ee71cd1 100644
--- a/src/plugins/lua/history_redis.lua
+++ b/src/plugins/lua/history_redis.lua
@@ -47,6 +47,7 @@ local lua_redis = require "lua_redis"
local fun = require "fun"
local ucl = require "ucl"
local ts = (require "tableshape").types
+local lua_verdict = require "lua_verdict"
local E = {}
local N = "history_redis"
local hostname = rspamd_util.get_hostname()
@@ -109,6 +110,7 @@ local function normalise_results(tbl, task)
tbl.rmilter = nil
tbl.messages = nil
tbl.urls = nil
+ tbl.action = lua_verdict.adjust_passthrough_action(task)
local seconds = task:get_timeval()['tv_sec']
tbl.unix_time = seconds
@@ -148,8 +150,8 @@ local function history_save(task)
rspamd_logger.errx('cannot get protocol reply, skip saving in history')
return
end
- -- 1 is 'json-compact' but faster
- local json = ucl.to_format(data, 1)
+
+ local json = ucl.to_format(data, 'json-compact')
if settings.compress then
json = rspamd_util.zstd_compress(json)