commit 2fed77b: [Minor] Apply lua augmentations where available
Vsevolod Stakhov
vsevolod at rspamd.com
Sat Dec 17 20:42:05 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-12-17 20:38:24 +0000
URL: https://github.com/rspamd/rspamd/commit/2fed77b9c674610da6d498e40358a475c44c5415
[Minor] Apply lua augmentations where available
---
lualib/lua_maps.lua | 8 ++++++++
1 file changed, 8 insertions(+)
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,
More information about the Commits
mailing list