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

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

View File

@@ -486,6 +486,38 @@
}
]
},
{
"function": "TAG",
"type": {
"dataType": "string",
"elements": [
{ "elementType": "input", "elementOptions": [], "transformers": [] }
]
},
"default_value": "",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Apprise notification tag"
},
{
"language_code": "es_es",
"string": "Tag de notificación de Apprise"
}
],
"description": [
{
"language_code": "en_us",
"string": "Apprise notification target tag."
},
{
"language_code": "es_es",
"string": "Informar de la tag de destino de la notificación."
}
]
},
{
"function": "PAYLOAD",
"type": {