summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2024-01-28 11:25:10 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2024-01-28 11:37:31 +0300
commitc8452b009d07a055208e92602c43bcf2143acde2 (patch)
tree29a5bcc927f73d02f9a1634cdfd6c46ddba8f8b0 /lualib
parentabc813e0698cc604e7651beebce93266a8e719a6 (diff)
downloadrspamd-c8452b009d07a055208e92602c43bcf2143acde2.tar.gz
rspamd-c8452b009d07a055208e92602c43bcf2143acde2.zip
[Rework] Breaking: Do not report module as action
in the /history response since we have the `passthrough_module` key for that purpose. While that might be handy in some situations, mixing actions and module names is confusing in general.
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_verdict.lua21
1 files changed, 1 insertions, 20 deletions
diff --git a/lualib/lua_verdict.lua b/lualib/lua_verdict.lua
index 6ce99e660..4c9880b85 100644
--- a/lualib/lua_verdict.lua
+++ b/lualib/lua_verdict.lua
@@ -186,23 +186,4 @@ exports.describe = function(verdict, what)
return nil
end
----[[[
--- @function lua_verdict.adjust_passthrough_action(task)
--- If an action is `soft reject` then this function extracts a module that has set this action
--- and returns an adjusted action (e.g. 'greylist' or 'ratelimit').
--- Otherwise an action is returned as is.
---]]
-exports.adjust_passthrough_action = function(task)
- local action = task:get_metric_action()
- if action == 'soft reject' then
- local has_pr, _, _, module = task:has_pre_result()
-
- if has_pr and module then
- action = module
- end
- end
-
- return action
-end
-
-return exports \ No newline at end of file
+return exports