diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json
index 1497e704..9d3cc9ac 100755
--- a/front/php/templates/language/en_us.json
+++ b/front/php/templates/language/en_us.json
@@ -499,7 +499,7 @@
"HRS_TO_KEEP_NEWDEV_name" : "Keep new devices for",
"HRS_TO_KEEP_NEWDEV_description" : "This is a maintenance setting. If enabled (0 is disabled), devices marked as New Device will be deleted if their First Session time was older than the specified hours in this setting. Use this setting if you want to auto-delete New Devices after X hours.",
"REPORT_DASHBOARD_URL_name" : "Pi.Alert URL",
- "REPORT_DASHBOARD_URL_description" : "This URL is used as the base for generating links in the emails. Enter full URL starting with http:// including the port number (no trailig slash /).",
+ "REPORT_DASHBOARD_URL_description" : "This URL is used as the base for generating links in HTML reports (e.g.: emails). Enter full URL starting with http:// including the port number (no trailig slash /).",
"DIG_GET_IP_ARG_name" : "Internet IP discovery",
"DIG_GET_IP_ARG_description" : "Change the dig utility arguments if you have issues resolving your Internet IP. Arguments are added at the end of the following command: dig +short .",
"NETWORK_DEVICE_TYPES_name" : "Network device types",
diff --git a/front/plugins/_publisher_ntfy/ntfy.py b/front/plugins/_publisher_ntfy/ntfy.py
index 2509ae61..2e459fda 100755
--- a/front/plugins/_publisher_ntfy/ntfy.py
+++ b/front/plugins/_publisher_ntfy/ntfy.py
@@ -15,7 +15,7 @@ from base64 import b64encode
sys.path.extend(["/home/pi/pialert/front/plugins", "/home/pi/pialert/pialert"])
import conf
-from plugin_helper import Plugin_Objects
+from plugin_helper import Plugin_Objects, handleEmpty
from logger import mylog, append_line_to_file
from helper import timeNowTZ, noti_obj, get_setting_value
from notification import Notification_obj
@@ -60,7 +60,7 @@ def main():
primaryId = pluginName,
secondaryId = timeNowTZ(),
watched1 = notification["GUID"],
- watched2 = response_text,
+ watched2 = handleEmpty(response_text),
watched3 = response_status_code,
watched4 = 'null',
extra = 'null',
@@ -109,9 +109,13 @@ def send(html, text):
response_status_code = response.status_code
+
+
# Check if the request was successful (status code 200)
if response_status_code == 200:
- response_text = response.text # This captures the response body/message
+ response_text = response.text # This captures the response body/message
+ else:
+ response_text = json.dumps(response.text)
except requests.exceptions.RequestException as e:
mylog('none', [f'[{pluginName}] Error: ', e])