Browse Source

Use update method to update session in WebPushNotificationWorker (#4235)

closed-social-v3
Akihiko Odaki 7 years ago
committed by Eugen Rochko
parent
commit
68941d4dfa
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      app/workers/web_push_notification_worker.rb

+ 1
- 2
app/workers/web_push_notification_worker.rb View File

@ -17,8 +17,7 @@ class WebPushNotificationWorker
rescue Webpush::InvalidSubscription, Webpush::ExpiredSubscription
# Subscription expiration is not currently implemented in any browser
session.web_push_subscription.destroy!
session.web_push_subscription = nil
session.save!
session.update!(web_push_subscription: nil)
rescue Webpush::PayloadTooLarge => e
Rails.logger.error(e)
end

Loading…
Cancel
Save