Add endpoint to remove web push subscription (#32626)
This commit is contained in:
parent
d1b20ea8f7
commit
05f23df3b7
6 changed files with 76 additions and 5 deletions
|
@ -29,6 +29,8 @@ class Web::PushSubscription < ApplicationRecord
|
|||
|
||||
delegate :locale, to: :associated_user
|
||||
|
||||
generates_token_for :unsubscribe, expires_in: Web::PushNotificationWorker::TTL
|
||||
|
||||
def pushable?(notification)
|
||||
policy_allows_notification?(notification) && alert_enabled_for_notification_type?(notification)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue