Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

修BUG:Markdown模板的错误可能导致telegram api报错 #27

Merged
merged 2 commits into from
Dec 25, 2019

Conversation

boypt
Copy link
Contributor

@boypt boypt commented Dec 25, 2019

发现telegram api对markdown msg的格式要求严格,如果出现非关闭的格式项会报错而导致发送失败,返回信息如下:

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

因此在Markdown模板渲染前,对PreviewText,Title里面的 *[_`` 四个md特殊符号做替换。

另外对返回消息检测,如果出现parse entities则日志内打印整个信息,引起用户注意,以便调试。

@indes indes merged commit e6cbb30 into indes:master Dec 25, 2019
@indes
Copy link
Owner

indes commented Dec 25, 2019

thx!

@boypt boypt deleted the fixtpl branch October 11, 2021 09:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants