|
|
@ -10,8 +10,8 @@ class Web::PushNotificationWorker |
|
|
|
notification = Notification.find(notification_id) |
|
|
|
|
|
|
|
subscription.push(notification) unless notification.activity.nil? |
|
|
|
rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription |
|
|
|
subscription.destroy! |
|
|
|
rescue Webpush::ResponseError => e |
|
|
|
subscription.destroy! if (400..499).cover?(e.response.code.to_i) |
|
|
|
rescue ActiveRecord::RecordNotFound |
|
|
|
true |
|
|
|
end |
|
|
|