Review comments

This commit is contained in:
Douglas Maitelli
2025-07-28 00:29:14 +00:00
parent 41397be1bd
commit 0d6bc71d2b
2 changed files with 36 additions and 3 deletions
+4 -3
View File
@@ -78,7 +78,7 @@ def main():
#-------------------------------------------------------------------------------
def check_config():
if get_setting_value('APPRISE_URL') == '' or get_setting_value('APPRISE_HOST') == '':
if get_setting_value('APPRISE_HOST') == '' or (get_setting_value('APPRISE_URL') == '' and get_setting_value('APPRISE_TAG') == ''):
return False
else:
return True
@@ -106,10 +106,11 @@ def send(html, text):
# Define Apprise compatible payload (https://github.com/caronc/apprise-api#stateless-solution)
target_key = "tags" if get_setting_value('APPRISE_TARGETTYPE') == 'tag' else "urls"
target_key = "tag" if get_setting_value('APPRISE_TARGETTYPE') == 'tag' else "urls"
target_value = get_setting_value('APPRISE_TAG') if target_key == 'tag' else get_setting_value('APPRISE_URL')
_json_payload = {
target_key: get_setting_value('APPRISE_URL'),
target_key: target_value,
"title": "NetAlertX Notifications",
"format": get_setting_value('APPRISE_PAYLOAD'),
"body": payloadData