]> source.dussan.org Git - rspamd.git/commitdiff
Update src/plugins/lua/elastic.lua
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Mon, 14 Oct 2024 12:08:52 +0000 (14:08 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2024 12:08:52 +0000 (14:08 +0200)
Co-authored-by: Vsevolod Stakhov <vsevolod@rspamd.com>
src/plugins/lua/elastic.lua

index 205a5ce8602aee4fddd765b75efd4a16afe3bea5..4303ce6cc12818983bd612732df1d07e69194777 100644 (file)
@@ -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