From d52e6e8e11cd1cd4042e4c6f24d1c2ac7223a096 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 16 Dec 2024 15:50:07 +0100 Subject: [PATCH] Notifications - "Send test" was not always following "System default notification format" (#2844) --- changedetectionio/update_worker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index e64c7c53..38de3d88 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -28,6 +28,8 @@ class update_worker(threading.Thread): def queue_notification_for_watch(self, notification_q, n_object, watch): from changedetectionio import diff + from changedetectionio.notification import default_notification_format_for_watch + dates = [] trigger_text = '' @@ -44,6 +46,10 @@ class update_worker(threading.Thread): else: snapshot_contents = "No snapshot/history available, the watch should fetch atleast once." + # If we ended up here with "System default" + if n_object.get('notification_format') == default_notification_format_for_watch: + n_object['notification_format'] = self.datastore.data['settings']['application'].get('notification_format') + html_colour_enable = False # HTML needs linebreak, but MarkDown and Text can use a linefeed if n_object.get('notification_format') == 'HTML':