Adding test, fixing notification url

This commit is contained in:
dgtlmoon
2022-12-05 17:54:03 +01:00
parent 5e0dae5703
commit 7e76276703
3 changed files with 46 additions and 1 deletions

View File

@@ -30,7 +30,6 @@ valid_notification_formats = {
def process_notification(n_object, datastore):
# Insert variables into the notification content
notification_parameters = create_notification_parameters(n_object, datastore)
@@ -50,6 +49,7 @@ def process_notification(n_object, datastore):
sent_objs=[]
from .apprise_asset import asset
for url in n_object['notification_urls']:
url = jinja2_env.from_string(url).render(**notification_parameters)
apobj = apprise.Apprise(debug=True, asset=asset)
url = url.strip()
if len(url):