]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Further simplify conditionals 1125/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 13 Nov 2016 15:02:51 +0000 (18:02 +0300)
committerGitHub <noreply@github.com>
Sun, 13 Nov 2016 15:02:51 +0000 (18:02 +0300)
src/plugins/lua/greylist.lua

index 35c30b806bb304db05f7d1f0fb8b44f9e463bdac..70ad2117d588e8bd1c744883d9a268cfd73e69cb 100644 (file)
@@ -275,11 +275,9 @@ local function greylist_set(task)
   end
 
   local action = task:get_metric_action('default')
-  if action == 'reject' then return end
-  if do_greylisting_required and do_greylisting_required ~= "1" then
+  if action == 'reject' or
+      not do_greylisting_required and action == 'no action' then
     return
-  else
-    if action == 'no action' then return end
   end
   local body_key = data_key(task)
   local meta_key = envelope_key(task)