rizaumami / tdbot.lua

Lua wrapper for telegram-bot
GNU General Public License v3.0
24 stars 21 forks source link

parse_mode Bug #5

Closed MyGitHub5 closed 6 years ago

MyGitHub5 commented 6 years ago

if i send msg with parse_mode and callback the callback funcation not work see: https://github.com/rizaumami/tdbot.lua/blob/master/tdbot.lua#L106 and 720 and 1088

assert (tdbot_function (a.tdbody, a.callback or dl_cb, a.data))
    end, {tdbody = tdbody, callback = callback, data = data})

This fix the Bug...

and if you can add split msg by 4096 byte per msg for a long text msg Thanks You, Amazing Work! :+1:

rizaumami commented 6 years ago

A hope now it's fixed.

I've added a simple text splitter to sendText function, with one condition; no text formatting. Splitting HTML or Markdown formatted text without breaking its formatting is complicated.

Thanx.

MyGitHub5 commented 6 years ago

Thanks!

you can remove this line: https://github.com/rizaumami/tdbot.lua/blob/master/tdbot.lua#L117

and you forget to add my fix...

https://github.com/rizaumami/tdbot.lua/blob/master/tdbot.lua#L107 and 741 and 1109

edit to this: assert (tdbot_function (a.tdbody, a.callback or dl_cb, a.data))

rizaumami commented 6 years ago

My bad. Hope it's fixed by now.