Przeglądaj źródła

[Minor] Properly register callback symbols

tags/2.6
Vsevolod Stakhov 4 lat temu
rodzic
commit
c11838dcba
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 1
    1
      src/lua/lua_config.c
  2. 2
    2
      src/plugins/lua/neural.lua

+ 1
- 1
src/lua/lua_config.c Wyświetl plik

@@ -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;


+ 2
- 2
src/plugins/lua/neural.lua Wyświetl plik

@@ -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

Ładowanie…
Anuluj
Zapisz