From bde04fd7e1c735bc585423cab6103379291c8a45 Mon Sep 17 00:00:00 2001 From: jofyxu <403321959@qq.com> Date: Sun, 21 Dec 2025 21:30:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(ntfymsg):=20=E4=BF=AE=E5=A4=8D=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=92=8C=E6=96=87=E6=9C=AC=E4=B8=BA=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E5=BF=97=E8=AD=A6=E5=91=8A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当标题和文本都为空时,使用空字符代替空字符串,以避免自动生成 “triggered” 文本。 - 将 `title = msg_body.get("title") or ""` 修改为 `title = msg_body.get("title") or "\u200b"` - 将 `text = msg_body.get("text") or ""` 修改为 `text = msg_body.get("text") or "\u200b"` --- plugins/ntfymsg/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ntfymsg/__init__.py b/plugins/ntfymsg/__init__.py index 3d515d7..aa1753c 100644 --- a/plugins/ntfymsg/__init__.py +++ b/plugins/ntfymsg/__init__.py @@ -353,9 +353,9 @@ class NtfyMsg(_PluginBase): # 类型 msg_type: NotificationType = msg_body.get("type") # 标题 - title = msg_body.get("title") or "" + title = msg_body.get("title") or "\u200b" # 文本 - text = msg_body.get("text") or "" + text = msg_body.get("text") or "\u200b" if not title and not text: logger.warn("标题和内容不能同时为空")