]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Pass both the multimap and the rules descriptions for combined when creating 5319/head
authorJose Celestino <japc@co.sapo.pt>
Sun, 26 Jan 2025 18:49:20 +0000 (18:49 +0000)
committerJose Celestino <japc@co.sapo.pt>
Sun, 26 Jan 2025 18:49:20 +0000 (18:49 +0000)
lualib/lua_maps_expressions.lua
src/plugins/lua/multimap.lua

index 996de99c0437ff97601efa8fb2d2c0f52bf3ba34..2ad9ad1d86b82a3ab49580f35b361aadf1599d11 100644 (file)
@@ -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)
index a61da606b8616dbb038f8545758f9dfc9ad14d0d..b96c105b1e726f2c72694f6fbf7ae8f5f3501209 100644 (file)
@@ -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