From bb3236febafd06fdc2d3dac3db4dc5cf51a37f38 Mon Sep 17 00:00:00 2001 From: bohung Date: Tue, 17 May 2022 12:18:42 +0800 Subject: [PATCH] uniq emails when sending epapers! --- lib/tasks/e_paper_tasks.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/e_paper_tasks.rake b/lib/tasks/e_paper_tasks.rake index c9f9388..533be7c 100644 --- a/lib/tasks/e_paper_tasks.rake +++ b/lib/tasks/e_paper_tasks.rake @@ -19,6 +19,7 @@ namespace :epaper do email_limit_reciever = site[:site_settings][:email_limit_reciever].to_i rescue 0 mail_limit = email_limit_reciever==0 ? 25 : email_limit_reciever emails += paper.other_emails_ids + emails.uniq! emails_valid = emails.select do |email| tmp = (email_format=~email) tmp==0 ? true : false