Skip to content

Commit bae1a89

Browse files
authored
Notifications - Default notification format (for new installs) now "HTML color" (#2843)
1 parent e49711f commit bae1a89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

changedetectionio/notification.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

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

changedetectionio/tests/test_add_replace_remove_filter.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def test_check_add_line_contains_trigger(client, live_server, measure_memory_usa
113113
res = client.post(
114114
url_for("settings_page"),
115115
data={"application-notification_title": "New ChangeDetection.io Notification - {{ watch_url }}",
116-
"application-notification_body": 'triggered text was -{{triggered_text}}- 网站监测 内容更新了',
116+
# triggered_text will contain multiple lines
117+
"application-notification_body": 'triggered text was -{{triggered_text}}- ### 网站监测 内容更新了 ####',
117118
# https://github.com/caronc/apprise/wiki/Notify_Custom_JSON#get-parameter-manipulation
118119
"application-notification_urls": test_notification_url,
119120
"application-minutes_between_check": 180,
@@ -171,7 +172,7 @@ def test_check_add_line_contains_trigger(client, live_server, measure_memory_usa
171172
assert os.path.isfile("test-datastore/notification.txt"), "Notification fired because I can see the output file"
172173
with open("test-datastore/notification.txt", 'rb') as f:
173174
response = f.read()
174-
assert b'-Oh yes please-' in response
175+
assert b'-Oh yes please' in response
175176
assert '网站监测 内容更新了'.encode('utf-8') in response
176177

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

0 commit comments

Comments
 (0)