knadh / tg-archive

A tool for exporting Telegram group chats into static websites like mailing list archives.
MIT License
829 stars 121 forks source link

Adding possibility to delete messages after sync #132

Closed kopiro closed 1 month ago

kopiro commented 4 months ago

As stated, adding delete_messages = 0 | 1 | 2 option to allow messages deletion after sync.

knadh commented 3 months ago

Thanks for the PR @kopiro. I think this is best done with a commandline flag. Of thousands, if not tens of thousands of messages that are fetched and stored in the DB, only a few would typically need to be deleted by hand. And this is a one-off action. So adding that to the permanent configuration isn't ideal.

Something like tg-archive maintain --delete=1,2,3,4,5 would be ideal. A new "maintain" mode like "sync" with a flag to take arbitrary message IDs which are directly deleted from the DB.