|
|
@ -28,6 +28,8 @@ class update_worker(threading.Thread):
|
|
|
|
|
|
|
|
|
|
|
|
def queue_notification_for_watch(self, notification_q, n_object, watch):
|
|
|
|
def queue_notification_for_watch(self, notification_q, n_object, watch):
|
|
|
|
from changedetectionio import diff
|
|
|
|
from changedetectionio import diff
|
|
|
|
|
|
|
|
from changedetectionio.notification import default_notification_format_for_watch
|
|
|
|
|
|
|
|
|
|
|
|
dates = []
|
|
|
|
dates = []
|
|
|
|
trigger_text = ''
|
|
|
|
trigger_text = ''
|
|
|
|
|
|
|
|
|
|
|
@ -44,6 +46,10 @@ class update_worker(threading.Thread):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
snapshot_contents = "No snapshot/history available, the watch should fetch atleast once."
|
|
|
|
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_colour_enable = False
|
|
|
|
# HTML needs linebreak, but MarkDown and Text can use a linefeed
|
|
|
|
# HTML needs linebreak, but MarkDown and Text can use a linefeed
|
|
|
|
if n_object.get('notification_format') == 'HTML':
|
|
|
|
if n_object.get('notification_format') == 'HTML':
|
|
|
|