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.38k stars 809 forks source link

Markdown parse errors. #465

Open cold-nagai opened 1 year ago

cold-nagai commented 1 year ago

Describe the bug tgcf (or Telethon, i should say) applies formatting when forwarding with errors.

To Reproduce Run tgcf in docker and resend a couple of messages in question with captions plugin enabled. https://t.me/CryptoEarnImp/8359 https://t.me/sunscryptNews/2624 https://t.me/crypton_off/10691

Additional context I wrote a small addition to TGCFs caption plugin to apply 'forwarded from' and some channel names also tend to break formatting. Message taken from https://t.me/UnderHyped:

caption.py

def modify(self, tm: TgcfMessage) -> TgcfMessage:
tm.text = f"{self.caption.header}{tm.text}\n\n{self.caption.footer}[{tm.title}](https://t.me/{tm.channel_id})" 

init.py self.title = tlutils.get_display_name(self.message.chat)

Example image

cold-nagai commented 11 months ago

Definitely an upstream issue. Can we bump telethon version? https://github.com/LonamiWebs/Telethon/pull/4268

@aahnik

aahnik commented 11 months ago

@cold-nagai sure! In the next release, I am planning to update all dependencies of tgcf to their latest version