diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index dada8d27..444fb363 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -431,7 +431,9 @@ def changedetection_app(config=None, datastore_o=None): def ajax_callback_send_notification_test(): import apprise - apobj = apprise.Apprise() + from .apprise_asset import asset + apobj = apprise.Apprise(asset=asset) + # validate URLS if not len(request.form['notification_urls'].strip()): diff --git a/changedetectionio/apprise_asset.py b/changedetectionio/apprise_asset.py new file mode 100644 index 00000000..6661cf16 --- /dev/null +++ b/changedetectionio/apprise_asset.py @@ -0,0 +1,11 @@ +import apprise + +# Create our AppriseAsset and populate it with some of our new values: +# https://github.com/caronc/apprise/wiki/Development_API#the-apprise-asset-object +asset = apprise.AppriseAsset( + image_url_logo='https://raw.githubusercontent.com/dgtlmoon/changedetection.io/master/changedetectionio/static/images/avatar-256x256.png' +) + +asset.app_id = "changedetection.io" +asset.app_desc = "ChangeDetection.io best and simplest website monitoring and change detection" +asset.app_url = "https://changedetection.io" diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index 59c1f556..5448284f 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -49,9 +49,9 @@ def process_notification(n_object, datastore): # raise it as an exception apobjs=[] sent_objs=[] + from .apprise_asset import asset for url in n_object['notification_urls']: - - apobj = apprise.Apprise(debug=True) + apobj = apprise.Apprise(debug=True, asset=asset) url = url.strip() if len(url): print(">> Process Notification: AppRise notifying {}".format(url))