Skip to content

Commit

Permalink
Notifications - Default notification format (for new installs) now "H…
Browse files Browse the repository at this point in the history
…TML color" (#2843)
  • Loading branch information
dgtlmoon authored Dec 16, 2024
1 parent e49711f commit bae1a89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion changedetectionio/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

default_notification_format_for_watch = 'System default'
default_notification_format = 'Text'
default_notification_format = 'HTML Color'
default_notification_body = '{{watch_url}} had a change.\n---\n{{diff}}\n---\n'
default_notification_title = 'ChangeDetection.io Notification - {{watch_url}}'

Expand Down
5 changes: 3 additions & 2 deletions changedetectionio/tests/test_add_replace_remove_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def test_check_add_line_contains_trigger(client, live_server, measure_memory_usa
res = client.post(
url_for("settings_page"),
data={"application-notification_title": "New ChangeDetection.io Notification - {{ watch_url }}",
"application-notification_body": 'triggered text was -{{triggered_text}}- 网站监测 内容更新了',
# triggered_text will contain multiple lines
"application-notification_body": 'triggered text was -{{triggered_text}}- ### 网站监测 内容更新了 ####',
# https://github.com/caronc/apprise/wiki/Notify_Custom_JSON#get-parameter-manipulation
"application-notification_urls": test_notification_url,
"application-minutes_between_check": 180,
Expand Down Expand Up @@ -171,7 +172,7 @@ def test_check_add_line_contains_trigger(client, live_server, measure_memory_usa
assert os.path.isfile("test-datastore/notification.txt"), "Notification fired because I can see the output file"
with open("test-datastore/notification.txt", 'rb') as f:
response = f.read()
assert b'-Oh yes please-' in response
assert b'-Oh yes please' in response
assert '网站监测 内容更新了'.encode('utf-8') in response

res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)
Expand Down

0 comments on commit bae1a89

Please sign in to comment.