diff --git a/app/jobs/notification/reopen_snoozed_notifications_job.rb b/app/jobs/notification/reopen_snoozed_notifications_job.rb index 89b245187..05235b62b 100644 --- a/app/jobs/notification/reopen_snoozed_notifications_job.rb +++ b/app/jobs/notification/reopen_snoozed_notifications_job.rb @@ -4,7 +4,7 @@ class Notification::ReopenSnoozedNotificationsJob < ApplicationJob def perform # rubocop:disable Rails/SkipsModelValidations Notification.where(snoozed_until: 3.days.ago..Time.current) - .update_all(snoozed_until: nil, updated_at: Time.current, last_activity_at: Time.current) + .update_all(snoozed_until: nil, updated_at: Time.current, last_activity_at: Time.current, read_at: nil) # rubocop:enable Rails/SkipsModelValidations end end diff --git a/spec/jobs/notification/reopen_snoozed_notifications_job_spec.rb b/spec/jobs/notification/reopen_snoozed_notifications_job_spec.rb index 2b210ef2b..024c3d0d6 100644 --- a/spec/jobs/notification/reopen_snoozed_notifications_job_spec.rb +++ b/spec/jobs/notification/reopen_snoozed_notifications_job_spec.rb @@ -17,6 +17,7 @@ RSpec.describe Notification::ReopenSnoozedNotificationsJob do expect(snoozed_till_5_minutes_ago.reload.snoozed_until).to be_nil expect(snoozed_till_tomorrow.reload.snoozed_until.to_date).to eq 1.day.from_now.to_date expect(snoozed_indefinitely.reload.snoozed_until).to be_nil + expect(snoozed_indefinitely.reload.read_at).to be_nil end end end