Fix notification apprise application name to changedetection.io #731

pull/738/head
dgtlmoon 2022-06-30 23:11:03 +02:00 zatwierdzone przez GitHub
rodzic 34b8784f50
commit 5f9e475fe0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 16 dodań i 3 usunięć

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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