TelegramTools / TLImporter

📲 Telegram Chat Importer: Import chats from WhatsApp or other services into Telegram
GNU Affero General Public License v3.0
127 stars 11 forks source link

Gropus message imports (strategy to workaround) #18

Closed maxlinux2000 closed 3 years ago

maxlinux2000 commented 3 years ago

Hello Soon I am going to leave WhatsApp forever, and I would like to import into telegram, the conversations of some groups ... and of course it does not work, also I cannot ask for the login code from all the participants of the original group.

It would be nice if group chats could be imported as if it were just me speaking, but before each message the name (or phone number) of the owner is automatically added. In this way, the chronological sequence of the group will be preserved without having to ask half the world for their passwords or login codes.

Cheers MaX

ferferga commented 3 years ago

@maxlinux2000 Hello

You should be able to already using solo mode.

Read documentation for more information.

maxlinux2000 commented 3 years ago

You are right! It's working!! :-)

itaybia commented 3 years ago

where is the "solo mode" documentation? couldn't find it in TLImporter. do i need to import each peer in the group separately, or is the "solo mode" an option to import all messages without actually knowing anything about the peers?

ferferga commented 3 years ago

@itaybia Solo mode just takes the text, formats them (so the name of the senders and dates appear correctly) and outputs everything into a single chat.

It doesn't care about the people in the group, everything is processed line by line in the file.

Closing this as the original question has been resolved.

itaybia commented 3 years ago

@ferferga can you please direct me to the documentation of the solo mode? is it just when entering "n" to the 1:1 option at start? when i do that it still asks me for 2 peers in the conversation. and eventually fails on String appending NoneType.

ferferga commented 3 years ago

@itaybia Exactly, right there

There's no documentation as all the documentation was written way before solo mode existed. I didn't deem it necessary because the process is exactly the same.

The 2 peers is asking you is to recognize in the text file the name of every person, so TLImporter can properly put the name of each of the people there. Solo Mode doesn't change that, it just outputs the messages to a single chat instead of simulating the conversation (as in the screenshot).

The NoneType error is probably because you are using a file that has an strange date/name formatting or the names you used when it asked you were incorrect.

maricn commented 3 years ago

This "Solo Option" still works by only importing two members' messages at a time. How to go about if I want to import messages from all the group members, let's say 5? Should we run the tool multiple times? For 5 people, I would run it twice to get 2*2=4 but then one person would be left out... Also, in that case the chronological order of the imported messages will not be linear.

That is absolutely a reason to ask for #20 full blown support for multiple users. Not to treat them as User1 and User2 but as an array of possible users.

Additionally it would be great to have an option to point to the target chat in Telegram where the messages should end up, instead of saving them to "Saved Messages". I'm currently migrating a small group conversation of three of us, and we all moved to Telegram from WA, and we already have a new chat in Telegram, just want to see the old history from WA straight there.

ferferga commented 3 years ago

@maricn I didn't do it for three reasons:

In fact, my other app TLMerger, which accomplishes the same task but inside Telegram, needs to send placeholder messages while fetching access hashes from the other party to simulate this interaction and avoid huge flood limits.

I welcome all Pull Requests about expanding features for groups, I'm not interested in doing them as I personally will never use them and TLImporter and all Telegram Tools are in a maintenance stage only (to call it somehow), but anybody is free to code it themselves and contribute them here, I would gladly review :).