Notifications - Fixing truncated notifications when tgram:// or discord:// is used with other notification methods (#2372 #2299)

pull/2374/head
dgtlmoon 7 months ago committed by GitHub
parent e27f66eb73
commit add2c658b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -122,10 +122,6 @@ def process_notification(n_object, datastore):
# Insert variables into the notification content # Insert variables into the notification content
notification_parameters = create_notification_parameters(n_object, datastore) notification_parameters = create_notification_parameters(n_object, datastore)
# Get the notification body from datastore
n_body = jinja_render(template_str=n_object.get('notification_body', ''), **notification_parameters)
n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters)
n_format = valid_notification_formats.get( n_format = valid_notification_formats.get(
n_object.get('notification_format', default_notification_format), n_object.get('notification_format', default_notification_format),
valid_notification_formats[default_notification_format], valid_notification_formats[default_notification_format],
@ -151,6 +147,11 @@ def process_notification(n_object, datastore):
with apprise.LogCapture(level=apprise.logging.DEBUG) as logs: with apprise.LogCapture(level=apprise.logging.DEBUG) as logs:
for url in n_object['notification_urls']: for url in n_object['notification_urls']:
# Get the notification body from datastore
n_body = jinja_render(template_str=n_object.get('notification_body', ''), **notification_parameters)
n_title = jinja_render(template_str=n_object.get('notification_title', ''), **notification_parameters)
url = url.strip() url = url.strip()
if not url: if not url:
logger.warning(f"Process Notification: skipping empty notification URL.") logger.warning(f"Process Notification: skipping empty notification URL.")

Loading…
Cancel
Save