DEV: Replace 'processed' column on notifications with new table (#11864)

This commit is contained in:
Mark VanLandingham
2021-01-27 10:29:24 -06:00
committed by GitHub
parent 60f10e9067
commit 809274fe0d
12 changed files with 61 additions and 46 deletions

View File

@ -25,9 +25,8 @@ class DoNotDisturbController < ApplicationController
def destroy
current_user.active_do_not_disturb_timings.destroy_all
current_user.publish_do_not_disturb(ends_at: nil)
current_user.notifications.unprocessed.each do |notification|
NotificationEmailer.process_notification(notification, no_delay: true)
end
current_user.shelved_notifications.each(&:process)
current_user.shelved_notifications.destroy_all
render json: success_json
end