mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 19:47:41 +08:00
fix(telegram): 修复通知标题含特殊符号时异常显示**符号
This commit is contained in:
@@ -237,10 +237,14 @@ class Telegram:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if title and text:
|
# 标准化标题后再加粗,避免**符号被显示为文本
|
||||||
caption = f"**{title}**\n{text}"
|
bold_title = (
|
||||||
elif title:
|
f"**{standardize(title).removesuffix('\n')}**" if title else None
|
||||||
caption = f"**{title}**"
|
)
|
||||||
|
if bold_title and text:
|
||||||
|
caption = f"{bold_title}\n{text}"
|
||||||
|
elif bold_title:
|
||||||
|
caption = bold_title
|
||||||
elif text:
|
elif text:
|
||||||
caption = text
|
caption = text
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user