aahnik / tgcf

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
https://github.com/aahnik/tgcf/wiki
MIT License
1.29k stars 775 forks source link

MediaCaptionTooLongError bug - solved #462

Closed ethisnotgood closed 1 year ago

ethisnotgood commented 1 year ago

When TGCF trying to forward a message from a private channel that contains a media file(.ogg in my example) with a caption length > 1024 characters, we receive an error: MediaCaptionTooLongError: The caption is too long (caused by SendMediaRequest) It seems to be a limitation in the Telegram API. However, the problem is that such messages are possible to create in the official Telegram client. As a result, some messages where the author posted such captions are not being forwarded.

One possible solution is to check the number of characters in the caption and, if it exceeds 1024 characters, send the file separately along with a separate message containing the caption. But how can this be done?

ethisnotgood commented 1 year ago

This can be resolved by purchasing Telegram Premium for the account.