- Issue created by @2dareis2do
- 🇬🇧United Kingdom 2dareis2do
It may be an idea to have a separate entity for paths. e.g. wpn_subscription_path with wpn_subscription_path table
id (int),
token(string),
In the database you have the defined the wpn_subscription entity with the wpn_subscriptions table that has the following fields:
I would like to add support for path as well.
This would allow for multiple paths per subscription, so a user could have a cta on the /news section as well as the /sports section etc.
An event could be fired on node publish and if path pattern fits with a section they have subscribed to user can be sent the notification.
Conversely, if they have subscribed to notifications but not the path, nothing will be sent.
This would allow users to subscribe to interest in relevant content or section denoted by path
Once https://www.drupal.org/project/web_push_notification/issues/3464691 ✨ Toggle between click Window on load and on click notifications Active has been implemented, it would also allows for users to subscribe to one or more sections.
Only issue I see with this is that in order to see if user has already subscribed to path, some data will likely need to be exposed on the back end (Drupal) to anonymous users if they have already accepted site/domain notifications. I think we should be able to return an array of paths based on the users web token.
If user has accepted site wide notifications, but not accepted notifications for the path, then they should see a CTA asking if they would like to be sent notifications for this page.
Active
1.0
Code
It may be an idea to have a separate entity for paths. e.g. wpn_subscription_path with wpn_subscription_path table
id (int),
token(string),