Giter VIP home page Giter VIP logo

tlmerger's Introduction

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

tlmerger's People

Contributors

ferferga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tlmerger's Issues

only 2 sources

Hi, my wife was suddenly ejected from several but not all groups we have in common and after rejoining the groups she doesn't have the history so I tried use TLMerger to import all messages but whatever I log with my phone number or her's I see only 2 sources, what I'm doing wrong ?

AttributeError: 'NoneType' object has no attribute 'get_dialogs'

Hello, I'm having this issue running the source code via Python3 IDLE installed on macOS. I've replaced YOUR_API_ID_HERE and YOUR_API_HASH_HERE with my API ID and HASH, and the program works well from logging to selecting chats (solo mode) and parameters before starting merging process.
But when it starts it says two errors from Python, they seem syntax error... but I don't really now. I attach a screenshot (don't worry about red warnings, it's Python IDLE) and log.
Thanks.
screenshot
TLMerger-log.log

Issue Merging

All the messages were retrieved. Backing up data into the database...

N/A% (0 of 39966) | | Elapsed Time: 0:00:00 ETA: --:--:--
Something went wrong in Telegram's side. This is the full exception:

'NoneType' object has no attribute 'mime_type'
This part of the process can't be recovered. You must start from scratch.

You can report this issue at https://github.com/TelegramTools/TLMerger/issues/new. Please, give as much details as possible of the error message and attach the 'TLMerger-log.log' file, as all the detailed information about the bug has been written there.

Press ENTER to close the app...

only 2 chats listed

Hello,

Use case:
On my account, I want to merge from a deleted user conversation (wife on a temporary phone number/account) to another conversation (regular conversation with my wife's regular account).

What I do:
On TLMerger, I login into my account, I select the timezone offset and then list the chats.

What I am getting:
I only get a chat list 2 units long. The deleted user conversation is the third... Also, what if my source was conversation 4?

What I was expecting to get:
A conversation list longer than 2 units.

Does no work for me

When running your script I obtain the following:

Something went wrong in Telegram's side. This is the full exception:

__init__() got an unexpected keyword argument 'max_value'
This part of the process can't be recovered. You must start from scratch.

You can report this issue at https://github.com/TelegramTools/TLMerger/issues/new. Please, give as much details as possible of the error message and attach the 'TLMerger-log.log' file, as all the detailed information about the bug has been written there.

Press ENTER to close the app...Traceback (most recent call last):
  File "TLMerger.py", line 1021, in GatherAllMessages
    bar = progressbar.ProgressBar(max_value=count)
TypeError: __init__() got an unexpected keyword argument 'max_value'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "TLMerger.py", line 3401, in <module>
    GatherAllMessages(ChosenChat)
  File "TLMerger.py", line 1221, in GatherAllMessages
    getpass.getpass("This part of the process can't be recovered. You must start from scratch.\n\nYou can report this issue at https://github.com/TelegramTools/TLMerger/issues/new. Please, give as much details as possible of the error message and attach the 'TLMerger-log.log' file, as all the detailed information about the bug has been written there.\n\nPress ENTER to close the app...")
  File "/usr/lib/python3.7/getpass.py", line 77, in unix_getpass
    passwd = _raw_input(prompt, stream, input=input)
  File "/usr/lib/python3.7/getpass.py", line 146, in _raw_input
    line = input.readline()
KeyboardInterrupt

From private chat group to private channel

Hey,
I would like to change a private chat group to a private channel, but this is not possible directly on Telegram.

So I thought to export the complete chat and import it in the newly created channel, but the TLMerger only shows me the two channels/groups with the newest posts.

Am I doing something wrong or is there a problem in TLMerger?
Or do you know some other way to do what I would like to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.