-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Describe the bug
When you have a global Notification Body
configured which includes restock.price
and/or restock.original_price
; if you send a notification from a standard Webpage Text/HTML, JSON and PDF changes
detection, the notification fails to send with the notification error:
Notification Log:
SENDING - null
'restock' is undefined
Version
v0.50.21
How did you install?
Docker
To Reproduce
Steps to reproduce the behavior:
- Go to
SETTINGS
- Click on
Notifications
- Set
Notification Title
to:{{watch_title}}
- Set
Notification Body
to:
{
"base_url": {{base_url|default('')|tojson}},
"watch_url": {{watch_url|default('')|tojson}},
"watch_uuid": {{watch_uuid|default('')|tojson}},
"watch_title": {{watch_title|default('')|tojson}},
"watch_tag": {{watch_tag|default('')|tojson}},
"preview_url": {{preview_url|default('')|tojson}},
"diff_url": {{diff_url|default('')|tojson}},
"diff": {{(diff or '')[:3500]|tojson}},
"diff_added": {{(diff_added or '')[:3500]|tojson}},
"diff_removed": {{(diff_removed or '')[:3500]|tojson}},
"diff_full": {{(diff_full or '')[:3500]|tojson}},
"diff_patch": {{(diff_patch or '')[:3500]|tojson}},
"current_snapshot": {{(current_snapshot or '')[:3500]|tojson}},
"triggered_text": {{triggered_text|default('')|tojson}},
"restock_price": {{restock.price|default('')|tojson}},
"restock_original_price": {{restock.original_price|default('')|tojson}}
}
- Set
Notification format
to:Text
- Press
Save
button - Recheck your default
Hacker News
detection (https://news.ycombinator.com/
) to trigger a detection - Error occurs
Expected behavior
Successfully send a notification
Screenshots

Additional context
I suppose this is somewhat expected to happen as the check is not a restock check; however it would be useful to have these fields default to null
so you do not need custom notifications per check.