From 06c9e799844a622971b2af4874d722a20896687c Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 12 Feb 2016 14:33:13 -0500 Subject: [PATCH] FIX: pending flags reminder email was ignoring the 'notify about flags after' site setting. --- app/jobs/scheduled/pending_flags_reminder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/scheduled/pending_flags_reminder.rb b/app/jobs/scheduled/pending_flags_reminder.rb index d4a68e6f145..8b196d4ae67 100644 --- a/app/jobs/scheduled/pending_flags_reminder.rb +++ b/app/jobs/scheduled/pending_flags_reminder.rb @@ -9,7 +9,7 @@ module Jobs def execute(args) if SiteSetting.notify_about_flags_after > 0 && PostAction.flagged_posts_count > 0 && - FlagQuery.flagged_post_actions('active').where('post_actions.created_at < ?', 48.hours.ago).pluck(:id).count > 0 + FlagQuery.flagged_post_actions('active').where('post_actions.created_at < ?', SiteSetting.notify_about_flags_after.to_i.hours.ago).pluck(:id).count > 0 message = PendingFlagsMailer.notify Email::Sender.new(message, :pending_flags_reminder).send