commit a7ee768: [Minor] Avoid using legacy method
Vsevolod Stakhov
vsevolod at rspamd.com
Sun May 29 10:07:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-05-29 11:04:58 +0100
URL: https://github.com/rspamd/rspamd/commit/a7ee76868ee6b6e4a63f27b61564a2d6388d9595 (HEAD -> master)
[Minor] Avoid using legacy method
---
lualib/lua_cfg_transform.lua | 2 +-
src/plugins/lua/dynamic_conf.lua | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index 08e4ce416..419ebf0f6 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -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'
diff --git a/src/plugins/lua/dynamic_conf.lua b/src/plugins/lua/dynamic_conf.lua
index 8a2f95acc..8498b9b7c 100644
--- a/src/plugins/lua/dynamic_conf.lua
+++ b/src/plugins/lua/dynamic_conf.lua
@@ -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
More information about the Commits
mailing list