Don't cut up words when splitting messages which are too long
Errbot automatically splits a chat message up into multiple smaller messages when the original is bigger than self.bot_config.MESSAGE_SIZE_LIMIT. The current implementation is rather naive and will happily split words into two as well.
By using textwrap instead we could split messages up without doing the splitting in the middle of actual words.
It is worse, this text is Markdown, so it cuts blocks, formatting, tables...
It needs to be a feature of the rendering.
Any objections if I take this one?
No objections at all. I didn't get a chance to work on this.
On Thu, Oct 13, 2016 at 7:23 PM Bradford [email protected] wrote:
Any objections if I take this one?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/errbotio/errbot/issues/754#issuecomment-253693431, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTYWD7M5pxgunqu7TpbVruBdWidMyRwks5qzue4gaJpZM4Ie1QR .
The errBot.py script was removed as of 4.2.1; where is this functionality located now? Doing some grepping, there are two files with self.bot_config.MESSAGE_SIZE_LIMIT: ./backends/slack.py ./core.py
It's in core.py now.
I'm going to take a stab at fixing this.
any update on this issue?
I started working on this and ran into issues because of @gbin's comment - we're splitting markdown.
For just text, something like textwrap is a quick fix. Markdown is much harder.