ManuelLR / Notmail_Bot

Telegram bot that acts as an email client
GNU General Public License v3.0
22 stars 4 forks source link

Error when forwarding long messages #9

Closed ManuelLR closed 6 years ago

ManuelLR commented 6 years ago

When the message is longer than Telegram permit (or I think so), it raise that error:

[11-10-17 13:01:22] {/usr/lib/python3.6/site-packages/telegram/ext/dispatcher.py:280} WARNING - A TelegramError was raised while processing the Update
[11-10-17 13:01:22]  {...../Tmail-bot/commands/generic.py:22} WARNING - Update "{'update_id': 21561, 'callback_query': {'id': '2411788', 'chat_instance': '-52917', 'message': {'message_id': 166, 'date': 1507719631, 'chat': {'id': 590, 'type': 'private', 'username': 'xxxxxxx', 'first_name': 'xxxxxn'}, 'edit_date': 15077cdsc678, 'text': '✂ ¡ÚLTIMOS DÍAS! Liquidación con un 22% de dto. total \n"HP Online - Tienda Estudiantes" <HP@hpnews.hp.com> \n(2017-10-11 04:16:46-06:00)--', 'entities': [{'type': 'bold', 'offset': 0, 'length': 54}, {'type': 'email', 'offset': 89, 'length': 16}, {'type': 'italic', 'offset': 109, 'length': 25}], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 32809, 'first_name': 'Tmail-bot', 'is_bot': True, 'username': 'xxxxx_bot'}, 'new_chat_member': None}, 'data': '/email/view/xyz@gmail.com/123456/inbox', 'from': {'id': 590, 'first_name': 'xxxxxn', 'is_bot': False, 'username': 'xxxxxxx', 'language_code': 'es-ES'}}}" caused error "Message_too_long"