From 10f8735f55b56e7e4c806e773fd6f335b8b066c9 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Thu, 19 Mar 2026 09:18:14 +0100 Subject: [PATCH] Update notification service --- AppImage/scripts/notification_channels.py | 3 +++ AppImage/scripts/notification_templates.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AppImage/scripts/notification_channels.py b/AppImage/scripts/notification_channels.py index e999a6f2..ef663099 100644 --- a/AppImage/scripts/notification_channels.py +++ b/AppImage/scripts/notification_channels.py @@ -76,6 +76,9 @@ class NotificationChannel(ABC): def _http_request(self, url: str, data: bytes, headers: Dict[str, str], method: str = 'POST') -> Tuple[int, str]: """Execute HTTP request with timeout. Returns (status_code, body).""" + # Ensure User-Agent is set to avoid Cloudflare 1010 errors + if 'User-Agent' not in headers: + headers['User-Agent'] = 'ProxMenux-Monitor/1.1' req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=self.REQUEST_TIMEOUT) as resp: diff --git a/AppImage/scripts/notification_templates.py b/AppImage/scripts/notification_templates.py index 1dd3cae2..9a0fce4a 100644 --- a/AppImage/scripts/notification_templates.py +++ b/AppImage/scripts/notification_templates.py @@ -1495,6 +1495,7 @@ EMOJI USAGE — place ONE emoji at the START of EVERY non-empty line (title and • pve-manager (9.1.4 -> 9.1.6) • qemu-server (9.1.3 -> 9.1.4) • pve-container (6.0.18 -> 6.1.2) + EXAMPLE — pve_update (new Proxmox VE version): [TITLE] 🆕 pve01: Proxmox VE 9.1.6 available @@ -1525,7 +1526,7 @@ EMOJI USAGE — place ONE emoji at the START of EVERY non-empty line (title and ⏱️ Duration: 00:01:10 🗄️ Storage: ct/101/2026-03-17T22:04:29Z - 📊 Total: 2 backups | 16.4 GiB | ⏱️ 00:05:31 + 📊 Total: 2 backups | 📦 16.4 GiB | ⏱️ 00:05:31 EXAMPLE — backup partially failed (some ok, some failed): [TITLE] @@ -1544,7 +1545,7 @@ EMOJI USAGE — place ONE emoji at the START of EVERY non-empty line (title and 💽 Size: 0 B ⏱️ Duration: 00:00:37 - 📊 Total: 2 backups | ❌ 1 failed | 12.3 GiB | ⏱️ 00:04:58 + 📊 Total: 2 backups | ❌ 1 failed | 📦 12.3 GiB | ⏱️ 00:04:58 EXAMPLE — disk I/O health warning: [TITLE]