With `skipErrorChangeNotification: true`, a notification was treated as an
"error reason change" whenever the incident had not started in the current
run:
currentIncident.start[0] !== currentTimeSecond
That holds for the very first DOWN notification too when `gracePeriod` is
set, because that one is sent `gracePeriod` minutes after the incident
started. So with both options enabled no DOWN notification was sent at all,
while the UP notification still was.
Work out whether this is the first notification of the incident (sent
immediately without a grace period, or when the grace period is met) and
only skip the ones after it. Behaviour without `gracePeriod`, or without
`skipErrorChangeNotification`, is unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
* Add basic webhook option to workerConfig.notification as alternative to apprise
* Add uptime.config.ts example for webhook option
* Removed trailing commas from newly added types for consistency
* Add ability to customize webhook body
* use template
---------
Co-authored-by: lyc8503 <me@lyc8503.net>
* fix: allow partial callbacks in config types
* fix: allow non-async callback functions in config types
* fix: specify type of monitor argument in callback type
* fix: use generics type for env argument in callback type
* feat: move types
* feat: add maintenance alert
* feat: move to config/base class to have fallback values on missing exports
* fix: wrong import for types
* Revert "fix: wrong import for types"
This reverts commit ca2b2e3a68.
* Revert "feat: move to config/base class to have fallback values on missing exports"
This reverts commit 9932ea2590.
* fix: imports
* chore: formatting
* fix: handle filtering for global status
* fix: pass props
* fix: ignore active maintenances when sending notifications
* fix: mark as warning when monitor is in maintenance
* fix: title width & warning icon
* fix: remove accordeons again
* alert config/style changes, worker code improve
* update example config
* update example config
* set monitors to be optional
---------
Co-authored-by: lyc8503 <me@lyc8503.net>