Skip to content

Commit

Permalink
[Minor] Properly register callback symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed May 26, 2020
1 parent 1720649 commit c11838d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lua/lua_config.c
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/lua/neural.lua
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c11838d

Please sign in to comment.