From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:08:52 +0000 (+0200) Subject: Update src/plugins/lua/elastic.lua X-Git-Tag: 3.11.0~33^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e660799311c2ebc60eca0f83e80fdd9394344420;p=thirdparty%2Frspamd.git Update src/plugins/lua/elastic.lua Co-authored-by: Vsevolod Stakhov --- diff --git a/src/plugins/lua/elastic.lua b/src/plugins/lua/elastic.lua index 205a5ce860..4303ce6cc1 100644 --- a/src/plugins/lua/elastic.lua +++ b/src/plugins/lua/elastic.lua @@ -659,15 +659,7 @@ local function get_general_metadata(task) end local fuzzy_hashes = task:get_mempool():get_variable('fuzzy_hashes', 'fstrings') - if fuzzy_hashes and #fuzzy_hashes > 0 then - local l = {} - for _, h in ipairs(fuzzy_hashes) do - table.insert(l, h) - end - r.fuzzy_hashes = l - else - r.fuzzy_hashes = empty - end +r.fuzzy_hashes = fuzzy_hashes or empty r.received_delay = 0 if user then -- calculate received_delay only for incoming traffic