FIX: pending flags reminder email was ignoring the 'notify about flags after' site setting.

This commit is contained in:
Neil Lalonde 2016-02-12 14:33:13 -05:00
parent 6fc2d9db3a
commit 06c9e79984

View File

@ -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