From: Jose Celestino Date: Sun, 26 Jan 2025 18:49:20 +0000 (+0000) Subject: [Minor] Pass both the multimap and the rules descriptions for combined when creating X-Git-Tag: 3.11.1~18^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5319%2Fhead;p=thirdparty%2Frspamd.git [Minor] Pass both the multimap and the rules descriptions for combined when creating --- 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