diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-16 11:51:46 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-16 11:51:46 +0000 |
commit | dcef54ec954aea628e3e4fe26693ef72c0635d36 (patch) | |
tree | 65f5338fe9ea951a0504fec2ddbb92487cc1c9ac /lualib | |
parent | 6eab75d10831863f217e0f38e06e6dccf6435d74 (diff) | |
download | rspamd-dcef54ec954aea628e3e4fe26693ef72c0635d36.tar.gz rspamd-dcef54ec954aea628e3e4fe26693ef72c0635d36.zip |
[Fix] Handle callbacks that returns table of options
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_squeeze_rules.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lualib/lua_squeeze_rules.lua b/lualib/lua_squeeze_rules.lua index d04352a68..5db715fb1 100644 --- a/lualib/lua_squeeze_rules.lua +++ b/lualib/lua_squeeze_rules.lua @@ -38,7 +38,12 @@ local function gen_lua_squeeze_function(order) if type(first) == 'boolean' then if first then table.remove(ret, 1) - task:insert_result(sym, 1.0, ret) + + if type(ret[1]) == 'table' then + task:insert_result(sym, 1.0, ret[1]) + else + task:insert_result(sym, 1.0, ret) + end end elseif type(first) == 'number' then table.remove(ret, 1) |