]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Properly register callback symbols
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 May 2020 10:16:35 +0000 (11:16 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 May 2020 10:16:35 +0000 (11:16 +0100)
src/lua/lua_config.c
src/plugins/lua/neural.lua

index fdf87d332403a5ea690377cf4647565c6fca1055..cfeb6e68d0e0586214a2c01208ea4098cb048980 100644 (file)
@@ -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;
 
index 732ab6dc2324eec746739edcbb0e9f557e0e0cf7..ed7cb4f6c8ebbc3f1cdeb2ad9d5436d2234247fd 100644 (file)
@@ -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