From: Vsevolod Stakhov Date: Sat, 17 Dec 2022 20:38:24 +0000 (+0000) Subject: [Minor] Apply lua augmentations where available X-Git-Tag: 3.5~143 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2fed77b9c674610da6d498e40358a475c44c5415;p=rspamd.git [Minor] Apply lua augmentations where available --- diff --git a/lualib/lua_maps.lua b/lualib/lua_maps.lua index a436a60f0..362f54365 100644 --- a/lualib/lua_maps.lua +++ b/lualib/lua_maps.lua @@ -449,6 +449,14 @@ local function rspamd_map_add_from_ucl(opt, mtype, description, callback) parse_err) end else + -- Adjust lua specific augmentations in a trivial case + if type(opt.url) == 'string' then + local nsrc,ntype = maybe_adjust_type(opt.url, mtype) + if nsrc and ntype then + opt.url = nsrc + mtype = ntype + end + end -- We have some non-trivial object so let C code to deal with it somehow... local map = rspamd_config:add_map{ type = mtype,