From 4febe1a1d628f134787c3dab0ed8c4fc7d7ac597 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 26 Nov 2022 15:31:07 +0000 Subject: [PATCH] [Minor] Fix some issues --- src/plugins/lua/settings.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index c18d2a3e9..b8c5736ab 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -360,7 +360,7 @@ local function check_settings(task) local selector_result = external_map.selector(task) if selector_result then - external_map.map:get_key(selector_result) + external_map.map:get_key(selector_result, nil, task) -- No more selection logic return else @@ -1338,6 +1338,9 @@ elseif set_section and type(set_section) == "table" then if maybe_external_map.map and maybe_external_map.selector then rspamd_logger.infox(rspamd_config, "added external map for user's settings") external_map = maybe_external_map + set_section.external_map = nil -- to avoid internal processing + else + rspamd_logger.warnx(rspamd_config, "cannot add external map for user's settings") end end rspamd_config:add_post_init(function () -- 2.39.5