mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
refactor(telegram): 显式传递 disable_web_page_preview 参数避免 @retry 下修改 kwargs
将 disable_web_page_preview 从修改 kwargs 字典改为显式传参给 send_message, 避免在 @retry 重试时因共享 kwargs 字典导致潜在问题。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
jxxghp
co-authored by
Claude Opus 4.6
parent
d9eb3295b0
commit
c68450fc7f
@@ -827,9 +827,11 @@ class Telegram:
|
|||||||
photo=image, caption=standardize(caption), **kwargs
|
photo=image, caption=standardize(caption), **kwargs
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if disable_web_page_preview is not None:
|
return self._bot.send_message(
|
||||||
kwargs["disable_web_page_preview"] = disable_web_page_preview
|
text=standardize(caption),
|
||||||
return self._bot.send_message(text=standardize(caption), **kwargs)
|
disable_web_page_preview=disable_web_page_preview,
|
||||||
|
**kwargs
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
raise RetryException(f"发送{'图片' if image else '文本'}消息失败")
|
raise RetryException(f"发送{'图片' if image else '文本'}消息失败")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user