Skip to content

Commit add2c65

Browse files
authored
Notifications - Fixing truncated notifications when tgram:// or discord:// is used with other notification methods (#2372 #2299)
1 parent e27f66e commit add2c65

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

changedetectionio/notification.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ def process_notification(n_object, datastore):
122122
# Insert variables into the notification content
123123
notification_parameters = create_notification_parameters(n_object, datastore)
124124

125-
# Get the notification body from datastore
126-
n_body = jinja_render(template_str=n_object.get('notification_body', ''), **notification_parameters)
127-
n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters)
128-
129125
n_format = valid_notification_formats.get(
130126
n_object.get('notification_format', default_notification_format),
131127
valid_notification_formats[default_notification_format],
@@ -151,6 +147,11 @@ def process_notification(n_object, datastore):
151147

152148
with apprise.LogCapture(level=apprise.logging.DEBUG) as logs:
153149
for url in n_object['notification_urls']:
150+
151+
# Get the notification body from datastore
152+
n_body = jinja_render(template_str=n_object.get('notification_body', ''), **notification_parameters)
153+
n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters)
154+
154155
url = url.strip()
155156
if not url:
156157
logger.warning(f"Process Notification: skipping empty notification URL.")

0 commit comments

Comments
 (0)