kopia lustrzana https://github.com/dgtlmoon/changedetection.io
Fix notification apprise application name to changedetection.io #731
rodzic
34b8784f50
commit
5f9e475fe0
|
@ -431,7 +431,9 @@ def changedetection_app(config=None, datastore_o=None):
|
||||||
def ajax_callback_send_notification_test():
|
def ajax_callback_send_notification_test():
|
||||||
|
|
||||||
import apprise
|
import apprise
|
||||||
apobj = apprise.Apprise()
|
from .apprise_asset import asset
|
||||||
|
apobj = apprise.Apprise(asset=asset)
|
||||||
|
|
||||||
|
|
||||||
# validate URLS
|
# validate URLS
|
||||||
if not len(request.form['notification_urls'].strip()):
|
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
|
# raise it as an exception
|
||||||
apobjs=[]
|
apobjs=[]
|
||||||
sent_objs=[]
|
sent_objs=[]
|
||||||
|
from .apprise_asset import asset
|
||||||
for url in n_object['notification_urls']:
|
for url in n_object['notification_urls']:
|
||||||
|
apobj = apprise.Apprise(debug=True, asset=asset)
|
||||||
apobj = apprise.Apprise(debug=True)
|
|
||||||
url = url.strip()
|
url = url.strip()
|
||||||
if len(url):
|
if len(url):
|
||||||
print(">> Process Notification: AppRise notifying {}".format(url))
|
print(">> Process Notification: AppRise notifying {}".format(url))
|
||||||
|
|
Ładowanie…
Reference in New Issue