From 25b40f2e49861c8cb56fd00dbedc6f97b716b0a8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 30 Apr 2018 19:45:02 +0100 Subject: [PATCH] [Minor] Fix virtual symbols registration as parent now supports just ids --- src/plugins/lua/antivirus.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index ff64618cb..4fb683c41 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -846,7 +846,7 @@ if opts and type(opts) == 'table' then if not cb then rspamd_logger.errx(rspamd_config, 'cannot add rule: "' .. k .. '"') else - rspamd_config:register_symbol({ + local id = rspamd_config:register_symbol({ type = 'normal', name = m['symbol'], callback = cb, @@ -854,7 +854,7 @@ if opts and type(opts) == 'table' then rspamd_config:register_symbol({ type = 'virtual', name = m['symbol_fail'], - parent = m['symbol'], + parent = id, score = 0.0, }) has_valid = true @@ -876,7 +876,7 @@ if opts and type(opts) == 'table' then rspamd_config:register_symbol({ type = 'virtual', name = sym, - parent = m['symbol'] + parent = id }) end end -- 2.39.5