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

修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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants