]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid using legacy method
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 29 May 2022 10:04:58 +0000 (11:04 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 29 May 2022 10:04:58 +0000 (11:04 +0100)
lualib/lua_cfg_transform.lua
src/plugins/lua/dynamic_conf.lua

index 08e4ce416808234a358110f6dc1798c826693bd6..419ebf0f645f5ca3585d87b3f0e4f121ce200c50 100644 (file)
@@ -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'
index 8a2f95accf1eb15ef799cd250fb9e902886af24d..8498b9b7c55de354271c1916902239f8457cf39a 100644 (file)
@@ -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