Background/Data-Only Recurring Notifications
See original GitHub issueIs your feature request related to a problem? Please describe. I’d like to be able to schedule recurring notifications that can be customized before being displayed to the user. Currently recurring scheduled notifications must have a fixed title etc. when they are scheduled, which means one cannot customize them based on the time of day or day of the week they are to be shown.
eg: if you schedule a daily recurring notification, you cannot customize your title or description based on the day of the week or the day of the month.
Describe the solution you’d like
I think the easiest and simplest solution is adding a flag in the NotificationRequestSchedule
class that signals the recurring notification as a “background” or “data-only” notification, meaning that it will not attempt to display any notification, only invoke the NotificationReceived
event. The NotificationId
and ReturningData
already provide enough user-provided info needed for filtering. This means a customized notification can be generated in the receive handler without the need to manually chain non-recurring scheduled notifications.
Describe alternatives you’ve considered The only feasible alternative is cloning of this plugin’s scheduling infrastructure to generate the events myself, although doable, it just creates more surface area for bugs.
Additional context I want to schedule daily recurring notifications for users to read certain articles. The article they will be directed to differs based on the days of the month. Being able to give the user a small preview of the article in the notification provides a massive boost in engagement, but currently cannot be done through the scheduled notification system.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
@thudugala I’ll update it in a few hours when I get off work 😃
@thudugala Looks like it should work well, however having the ability to suppress the notification is also rather useful .
Should be trivial to add a check on the return value of the
NotificationReceiving
event and bail out if it returns null. This should mean that schedules aren’t cancelled when the notification is suppressed either. However I dunno how intuitive that is in terms of usability.