Notification fixes - error on mailto:// when no format was specified, fixing default body and title of notifications to respect global settings (#2085)

This commit is contained in:
dgtlmoon
2024-01-05 20:15:13 +01:00
committed by GitHub
parent 0d92be348a
commit 77133de1cf
2 changed files with 13 additions and 4 deletions

View File

@@ -1592,6 +1592,15 @@ def notification_runner():
try:
from changedetectionio import notification
# Fallback to system config if not set
if not n_object.get('notification_body') and datastore.data['settings']['application'].get('notification_body'):
n_object['notification_body'] = datastore.data['settings']['application'].get('notification_body')
if not n_object.get('notification_title') and datastore.data['settings']['application'].get('notification_title'):
n_object['notification_title'] = datastore.data['settings']['application'].get('notification_title')
if not n_object.get('notification_format') and datastore.data['settings']['application'].get('notification_format'):
n_object['notification_title'] = datastore.data['settings']['application'].get('notification_format')
sent_obj = notification.process_notification(n_object, datastore)