]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Multimap: Also handle table like options
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 21 Nov 2019 13:33:08 +0000 (13:33 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 21 Nov 2019 13:33:08 +0000 (13:33 +0000)
src/plugins/lua/multimap.lua

index 347dee9bcc0208c6c566a7fb93765447aaa50fd5..06db71053ee8623c46c975051fc2038f0f2b8c12 100644 (file)
@@ -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