Fix notification apprise application name to changedetection.io #731

pull/738/head
dgtlmoon 2 years ago committed by GitHub
parent 34b8784f50
commit 5f9e475fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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()):

@ -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"

@ -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))

Loading…
Cancel
Save