From: Vsevolod Stakhov Date: Sat, 24 Jan 2026 16:33:17 +0000 (+0000) Subject: [Feature] Store matched fuzzy hashes in Redis history X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5860%2Fhead;p=thirdparty%2Frspamd.git [Feature] Store matched fuzzy hashes in Redis history Add fuzzy_hashes array to history entries by retrieving matched hashes from task mempool in history_redis plugin. --- diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua index a15ec0fdc1..7eec2dc03d 100644 --- a/src/plugins/lua/history_redis.lua +++ b/src/plugins/lua/history_redis.lua @@ -139,6 +139,12 @@ local function normalise_results(tbl, task) end tbl.user = task:get_user() or 'unknown' + + -- Retrieve fuzzy hashes that matched during scanning + local fuzzy_hashes = task:get_mempool():get_variable('fuzzy_hashes', 'fstrings') + if fuzzy_hashes and #fuzzy_hashes > 0 then + tbl.fuzzy_hashes = fuzzy_hashes + end end local function history_save(task)