Compare commits
1 Commits
HIDE_REFER
...
731/appris
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a57e5bba6e |
@@ -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()):
|
||||||
|
|||||||
11
changedetectionio/apprise_asset.py
Normal file
11
changedetectionio/apprise_asset.py
Normal file
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user