commit 4951493: [Minor] Replies: Fix predicate

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Apr 27 10:07:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-04-27 11:01:21 +0100
URL: https://github.com/rspamd/rspamd/commit/4951493fadf79273a54da96839230fbf175e076c (HEAD -> master)

[Minor] Replies: Fix predicate

---
 src/plugins/lua/replies.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua
index 9161ee043..2160b0c50 100644
--- a/src/plugins/lua/replies.lua
+++ b/src/plugins/lua/replies.lua
@@ -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
 


More information about the Commits mailing list