mirror of
https://github.com/jxxghp/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix(ntfymsg): 修复标题和文本为空时的日志警告问题
当标题和文本都为空时,使用空字符代替空字符串,以避免自动生成 “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"`
This commit is contained in:
@@ -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("标题和内容不能同时为空")
|
||||
|
||||
Reference in New Issue
Block a user