commit d727dda: [Minor] Multimap: Also handle table like options
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Nov 21 13:35:17 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-21 13:33:08 +0000
URL: https://github.com/rspamd/rspamd/commit/d727dda235afb5cf4671aae4d9f72ad4d0a8bc9a (HEAD -> master)
[Minor] Multimap: Also handle table like options
---
src/plugins/lua/multimap.lua | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 347dee9bc..06db71053 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -590,7 +590,12 @@ local function multimap_callback(task, rule)
if opt then
- task:insert_result(forced, symbol, score, tostring(opt))
+ if type(opt) == 'table' then
+ task:insert_result(forced, symbol, score, fun.totable(fun.map(tostring, opt)))
+ else
+ task:insert_result(forced, symbol, score, tostring(opt))
+ end
+
else
task:insert_result(forced, symbol, score)
end
More information about the Commits
mailing list