tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Sending status "messageSendingStatePending" forewer #2315

Closed Miroga64 closed 1 year ago

Miroga64 commented 1 year ago

I am trying to send pdf file from bot to user. After I use "sendMessage", an updateNewMessage is returned to me, with the messageSendingStatePending status, but it is not sent to the chat. You can wait as long as you like, the status of the message will not change

v: { : 'updateNewMessage', message: { : 'message', id: id, senderid: { : 'messageSenderUser', user_id: user_id}, chat_id: chat_id, sendingstate: { : 'messageSendingStatePending' }, is_outgoing: true, is_pinned: false, can_be_edited: false, can_be_forwarded: true, can_be_saved: true, can_be_deleted_only_for_self: false, can_be_deleted_for_all_users: true, can_get_added_reactions: false, can_get_statistics: false, can_get_message_thread: false, can_get_viewers: false, can_get_media_timestamp_links: false, can_report_reactions: false, has_timestamped_media: true, is_channel_post: false, is_topic_message: false, contains_unread_mention: false, date: 1677057416, edit_date: 0, unread_reactions: [], reply_in_chat_id: 0, reply_to_message_id: 0, message_thread_id: 0, self_destruct_time: 0, self_destruct_in: 0, auto_delete_in: 0, via_bot_user_id: 0, author_signature: '', media_album_id: '0', restrictionreason: '', content: { : 'messageDocument', document: [Object], caption: [Object] } } } Using tdl library for Node.js

levlam commented 1 year ago

Do you handle updateMessageSendFailed?

If yes and the update isn't sent, then Telegram is blocked in your area and you need to use a proxy.

You can check TDLib logs for details.