Skip to content
Snippets Groups Projects
Commit 8b43d6bf authored by Sorin Davidoi's avatar Sorin Davidoi Committed by Eugen Rochko
Browse files

fix(web_push_notification_worker): Guard against deleted notifications (#4379)

parent b8adb4d7
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,8 @@ class WebPushNotificationWorker
session_activation = SessionActivation.find(session_activation_id)
notification = Notification.find(notification_id)
return if session_activation.nil? || notification.nil?
begin
session_activation.web_push_subscription.push(notification)
rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription => e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment