From c11838dcbacbfd0a75e98f95a63a026217c88c51 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 26 May 2020 11:16:35 +0100 Subject: [PATCH] [Minor] Properly register callback symbols --- src/lua/lua_config.c | 2 +- src/plugins/lua/neural.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index fdf87d332..cfeb6e68d 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -1831,7 +1831,7 @@ lua_parse_symbol_type (const gchar *str) ret |= SYMBOL_TYPE_POSTFILTER | SYMBOL_TYPE_GHOST; } else if (g_ascii_strcasecmp (str, "idempotent") == 0) { ret |= SYMBOL_TYPE_POSTFILTER | SYMBOL_TYPE_GHOST | - SYMBOL_TYPE_IDEMPOTENT; + SYMBOL_TYPE_IDEMPOTENT | SYMBOL_TYPE_CALLBACK; } else { gint fl = 0; diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua index 732ab6dc2..ed7cb4f6c 100644 --- a/src/plugins/lua/neural.lua +++ b/src/plugins/lua/neural.lua @@ -1390,7 +1390,7 @@ end local id = rspamd_config:register_symbol({ name = 'NEURAL_CHECK', - type = 'postfilter', + type = 'postfilter,callback', flags = 'nostat', priority = 6, callback = ann_scores_filter @@ -1448,7 +1448,7 @@ end rspamd_config:register_symbol({ name = 'NEURAL_LEARN', - type = 'idempotent', + type = 'idempotent,callback', flags = 'nostat,explicit_disable', priority = 5, callback = ann_push_vector -- 2.39.5