Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.
/ TLMerger Public archive

🔀 Telegram Chat Merger: Merge chats in Telegram

License

Notifications You must be signed in to change notification settings

TelegramTools/TLMerger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLMerger - Telegram Chat Merger

This application can merge two chats inside Telegram. It tries to achieve the same goal as TLImporter, but using an existing Telegram chat as the source of the messages.

Use cases

  • You deleted a chat, but your partner still keeps it? You can ask him to run TLMerger and join his chat history with your chat history, so you both can keep the exact message history.

  • One friend deleted his Telegram account and he joined back, but you still keep the old chat with him? You can join the new and old chat history together

  • Moving one channel to another one and forwarding is too much work? TLMerger can do it!

Joining channels/groups is an experimental feature, as TLMerger was designed to join private chats. Little changes incode might be required for this, you can help by publishing a pull request

How does it work?

TLMerger makes use of two chats, the source dialog and the destination dialog. From the source dialog, TLMerger will copy all the messages, photos, replies, media and files that will be copied afterwards into the destination dialog.

The destination dialog will always be another chat in your account. However, you have two options:

  • You can use 'Solo Mode' and copy the messages from one chat to another (without the Forwarded from header)
  • You can log in another Telegram user and merge the source dialog with your chat with the chat you have with the user that was logged in.

See how logging another user works. We are going to merge this chat from the user 'Diego Velázquez' to 'Francisco de Goya':

Original chat

Process and result (using Secret Mode for demonstration purposes)

The demo chat used is very simple, but TLMerger can copy files, gifs, images, stickers, voice notes, video notes, contacts, live locations, locations, games and link previews. You can customize some of the settings related to some kinds of media in TLMerger's menus (see video above to see the options).

The copy of most of the content is exclusively done server-side, so don't worry, you don't need a fast Internet connection to re-upload the files. Only the link previews will be downloaded and re-uploaded (if you decide you want to keep them in your merging settings)

How to use?

  • Log in to Telegram. Follow on-screen instructions

  • Choose the source dialog. Wait until TLMerger fetch all the messages.

  • Choose if you want to copy the messages into your own account or into the account's of another person. You can use Secret Mode to log in your partner into TLMerger, as demoed in the video. Further documentation on how this work can be found in TLImporter's wiki

If you are merging your messages with your chat with another Telegram user:

  • Log in your partner, locally or by using Secret Mode.

  • Customize your settings and confirm them

  • Wait until TLMerger copies the messages from the source dialog into your chat between you and the partner you logged in (the destination dialog).

  • You will be done after a while!

If you are copying the messages into your own account:

  • Choose the chat where do you want to copy the messages (the destination dialog)

  • Customize your settings and confirm them

  • Wait until TLMerger copies the messages from the source dialog into the destination dialog

  • You will be done after a while!

Download

You can always grab the latest version heading over the releases tab. I built binaries for Windows (64 bits), Linux amd64 and Linux armhf

  • On Windows: Simply double click on the .exe file
  • On Linux: Download the binary, cd to the folder where the download is located and do chmod +x TLMerger-xxx && ./TLMerger-xxx

If you're running other systems (like MacOS), you will need to build the files from source.

Build from sources

Make sure that you replace the api_id and api_hash variables in the TLMerger.py file. Read instructions here for getting your own from Telegram.

You can't use Secret Mode if one of the sides is still using the binaries: I'm the only holder of the encryption key, so it's more difficult for malicious people to compromise them. If you want to use the Secret Mode, you must build both TLMerger and TLSecret from sources using the same password for it to work. You can specify the password used for encryption/decryption in the password variable.

Credits

This couldn't be possible without Telethon, and his great creator, Lonami, who always was ready to answer some questions and helping in development.

Thanks to the PyInstaller team for their great tool, which I used to build the binaries.

Also, huge acknowledgements to Telegram for making such a great messenger!

Give always credits to all the original authors and owners when using some parts of their hard work in your own projects