Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram 推送报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 44 #73

Closed
sunnywangzi opened this issue May 8, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sunnywangzi
Copy link
Contributor

sunnywangzi commented May 8, 2023

1,当推送消息是这样时

[任务成功] 备份, xxx服务(xxx_xxx-HK) Upload Complete. Download Page: https://example.com/f/645xxxxx Thank you for using our services.

会报错

Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 44

2,但是当把推送消息中的 () 替换成其他符号如 ´]´ 时就不会报错
3,已知 ①直接使用telegram的api推送相同内容可以正常发送
②搜索到 可能与md的转译 有关

@songquanpeng
Copy link
Owner

感谢反馈,我调查一下。

@songquanpeng songquanpeng changed the title [问题]关于telegram推送方式 Telegram 推送报错:Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 44 May 8, 2023
@songquanpeng songquanpeng added the bug Something isn't working label May 8, 2023
@songquanpeng
Copy link
Owner

报错是 Telegram 服务器的报错,原因出在推送的内容不是合法 Markdown 文本。

我修改一下程序,

  1. 如果使用 description 字段不指定 parse_mode 模式为 Markdown。
  2. 使用 content 字段则指定模式为 Markdown。

@songquanpeng
Copy link
Owner

songquanpeng commented May 8, 2023

已修复,已推送 v0.4.3-alpha

此处的场景是不需要 Markdown 解析,所以使用 description 字段指定内容即可,不要使用 content 字段。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants