diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-05-12 09:45:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-05-12 09:45:08 +0100 |
commit | 860079f690c8b831eece10e303ca6d568970dc4e (patch) | |
tree | a4c24dd622f3509005cf5ae47a39586ed33083ec /lualib/rspamadm | |
parent | b2452e7281c4a8ef0520f458487c5b4809d60c9d (diff) | |
download | rspamd-860079f690c8b831eece10e303ca6d568970dc4e.tar.gz rspamd-860079f690c8b831eece10e303ca6d568970dc4e.zip |
[Minor] Fix flags stat
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r-- | lualib/rspamadm/fuzzy_stat.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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 |