Skip to content

Commit 8e9bf4a

Browse files
committed
Notifications - "Send test" was not always following "System default notification format"
1 parent bae1a89 commit 8e9bf4a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

changedetectionio/update_worker.py

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def __init__(self, q, notification_q, app, datastore, *args, **kwargs):
2828

2929
def queue_notification_for_watch(self, notification_q, n_object, watch):
3030
from changedetectionio import diff
31+
from changedetectionio.notification import default_notification_format_for_watch
32+
3133
dates = []
3234
trigger_text = ''
3335

@@ -44,6 +46,10 @@ def queue_notification_for_watch(self, notification_q, n_object, watch):
4446
else:
4547
snapshot_contents = "No snapshot/history available, the watch should fetch atleast once."
4648

49+
# If we ended up here with "System default"
50+
if n_object.get('notification_format') == default_notification_format_for_watch:
51+
n_object['notification_format'] = self.datastore.data['settings']['application'].get('notification_format')
52+
4753
html_colour_enable = False
4854
# HTML needs linebreak, but MarkDown and Text can use a linefeed
4955
if n_object.get('notification_format') == 'HTML':

0 commit comments

Comments
 (0)