From 860079f690c8b831eece10e303ca6d568970dc4e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 May 2023 09:45:08 +0100 Subject: [PATCH] [Minor] Fix flags stat --- lualib/rspamadm/fuzzy_stat.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lualib/rspamadm/fuzzy_stat.lua b/lualib/rspamadm/fuzzy_stat.lua index 9e382c06f..47b780a09 100644 --- a/lualib/rspamadm/fuzzy_stat.lua +++ b/lualib/rspamadm/fuzzy_stat.lua @@ -39,6 +39,13 @@ local function add_data(target, src) if not target['ips'][ip] then target['ips'][ip] = {} end add_data(target['ips'][ip], st) end + elseif k == 'flags' then + if not target['flags'] then target['flags'] = {} end + -- Iterate over Flags + for flag,st in pairs(v) do + if not target['flags'][flag] then target['flags'][flag] = {} end + add_data(target['flags'][flag], st) + end elseif k == 'keypair' then if type(v.extensions) == 'table' then if type(v.extensions.name) == 'string' then -- 2.39.5