Skip to content

Commit

Permalink
Notifications - "Send test" was not always following "System default …
Browse files Browse the repository at this point in the history
…notification format"
  • Loading branch information
dgtlmoon committed Dec 16, 2024
1 parent bae1a89 commit 8e9bf4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changedetectionio/update_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __init__(self, q, notification_q, app, datastore, *args, **kwargs):

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 = ''

Expand All @@ -44,6 +46,10 @@ def queue_notification_for_watch(self, notification_q, n_object, watch):
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':
Expand Down

0 comments on commit 8e9bf4a

Please sign in to comment.