]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Replies: Fix predicate
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Apr 2020 10:01:21 +0000 (11:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Apr 2020 10:01:40 +0000 (11:01 +0100)
src/plugins/lua/replies.lua

index 9161ee0439b409caa84d0f472b2eb3b64b1e7109..2160b0c5030beff2038d13c85d3074f80eecf815 100644 (file)
@@ -69,13 +69,13 @@ local function replies_check(task)
     local rcpts = task:get_recipients('mime')
 
     if rcpts then
-      local predicate = function(input_rcpt)
+      local filter_predicate = function(input_rcpt)
         local real_rcpt_h = make_key(input_rcpt:lower(), 8)
 
         return real_rcpt_h == stored_rcpt
       end
 
-      if fun.any(predicate, rcpts) then
+      if fun.any(filter_predicate, fun.map(function(rcpt) return rcpt.addr or '' end, rcpts)) then
         return true
       end