-
Notifications
You must be signed in to change notification settings - Fork 6
Description
When the jio has a large number of orders, the generated messages may exceed telegram's message length limit. This currently causes the bot to be unable to respond.
We have created chunkify that allows us to split up long messages. For messages that will not be edited, simply break them up first (if necessary) - Modify send in messenger.js to use chunkify. Take note that the chunks should be sent in order, and sendstartme should not be triggered multiple times.
The live order message (in the jio group) gets edited. In this case, we wouldn't chunkify it. Instead, if there are too many orders, we instead replace the order list with an info text. Users can still view their orders by pressing "vieworder" button. Here, I am assuming that the other components of the message (title, restaurant, comments, etc) are within the length limit.