logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 68941d4dfa91194eb6c5b9633df6d88440808e71
parent: 1d2616b79b6bc5b433092c302967c0ee33bd9845
Author: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Date:   Mon, 17 Jul 2017 18:03:42 +0900

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


Diffstat:

Mapp/workers/web_push_notification_worker.rb3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/workers/web_push_notification_worker.rb b/app/workers/web_push_notification_worker.rb @@ -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