From 9b29aafe518af7ab62802b71aecaa555934f85a4 Mon Sep 17 00:00:00 2001 From: Jose Celestino Date: Sun, 26 Jan 2025 18:49:20 +0000 Subject: [PATCH] =?utf8?q?[Minor]=C2=A0Pass=20both=20the=20multimap=20and?= =?utf8?q?=20the=20rules=20descriptions=20for=20combined=20when=20creating?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lualib/lua_maps_expressions.lua | 2 +- src/plugins/lua/multimap.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lualib/lua_maps_expressions.lua b/lualib/lua_maps_expressions.lua index 996de99c04..2ad9ad1d86 100644 --- a/lualib/lua_maps_expressions.lua +++ b/lualib/lua_maps_expressions.lua @@ -155,7 +155,7 @@ local function create(cfg, obj, module_name) end end local map = lua_maps.map_add_from_ucl(rule.map, rule.type, - obj.description or module_name) + rule.description or obj.description or module_name) if not map then rspamd_logger.errx(cfg, 'cannot add map for element %s in module %s', name, module_name) diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index a61da606b8..b96c105b1e 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -1267,6 +1267,7 @@ local function add_multimap_rule(key, newrule) { rules = newrule.rules, expression = newrule.expression, + description = newrule.description, on_load = newrule.dynamic_symbols and multimap_on_load_gen(newrule) or nil, }, N, 'Combined map for ' .. newrule.symbol) if not newrule.combined then -- 2.47.3