[IMPROVE] Split NOTIFICATIONS_SCHEDULE_DELAY
into three separate variables
#17669
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This patch builds upon PR #17357 by allowing the notification delay to be customized for 'online', 'away' and 'offline' statuses via environment variables. It also allows each notification type to be disabled by setting the delay to -1.
Issue(s)
This aims to fix issue #17492, although a proper fix would allow it to be configured via the Admin section. The problem is most users don't want to be emailed when they're online, regardless if they've read the messages or not. The current workaround is setting NOTIFICATIONS_SCHEDULE_DELAY to an extremely high value, though that doesn't really solve the issue.
Types of changes
Checklist
Changelog
Now the email notification delay can now be customized with the following environment variables:
NOTIFICATIONS_SCHEDULE_DELAY_ONLINE
NOTIFICATIONS_SCHEDULE_DELAY_AWAY
NOTIFICATIONS_SCHEDULE_DELAY_OFFLINE