Skip to content

Commit

Permalink
[Minor] Avoid using legacy method
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed May 29, 2022
1 parent 308aceb commit a7ee768
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lualib/lua_cfg_transform.lua
Expand Up @@ -134,7 +134,7 @@ local function symbol_transform(cfg, k, v)
end
end
-- Now check what Rspamd knows about this symbol
local sym = rspamd_config:get_metric_symbol(k)
local sym = rspamd_config:get_symbol(k)

if not sym or not sym.group then
-- Otherwise we just use group 'ungrouped'
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/lua/dynamic_conf.lua
Expand Up @@ -92,7 +92,7 @@ local function apply_dynamic_scores(_, sc)
end
end, fun.filter(function(k, v)
-- Select elts with scores that are different from local ones
local sym = rspamd_config:get_metric_symbol(k)
local sym = rspamd_config:get_symbol(k)
if (sym and alpha_cmp(sym.score, v)) or cur_settings.updates.symbols[k] then
return false
end
Expand Down

0 comments on commit a7ee768

Please sign in to comment.