Suberbia / UltimateChatRestorer

A tool for converting Telegram chat exports into a WhatsApp-compatible format. This script transforms JSON exports from Telegram into a plain text format that mirrors WhatsApp’s chat layout, making it easier to import chats back into Telegram or for use in other applications.
MIT License
61 stars 5 forks source link

File is shared as an attachment #3

Open Vloweer opened 3 months ago

Vloweer commented 3 months ago

Hello

I have an issue with Importing the "_chat.txt" into Telegram

Telegram doesn't recognise the file as a chat history and import it, instead it shares it as an attachment

I compressed _chat.txt and named the archive "Whatsapp Chat - xxxx.zip" (replacing xxxx with the name of the user whose chat I'm importing)

I transfer the file from my MacOS to my phone

I navigate to where I saved the file, and tap on it. I choose the "Share" option, select the Telegram app.

I select the contact and send the file.

and it sends the ".zip" file as an attachment. It doesn't import it as chat history.

I also tried sharing only the "_chat.txt", but it sends it as an attachment the same

Could you help me, please? Thank you

Suberbia commented 3 months ago

Hi,

I was able to replicate your issue when I compressed the "_chat.txt" file locally on my iPhone. This suggests that the problem might be related to the compression software you're using on your Mac. I recommend trying WinRAR or 7-Zip for compression instead.

Another possible cause could be the format of the "_chat.txt" file. Ensure the content is formatted correctly, similar to this:

[03.05.2024, 15:19:36] Sender: Message

Let me know if this helps!

stcassio commented 3 months ago

hi! i encountered the same problem. i tried to compress the file in different ways(winrar and 7-zip too, the file format is also correct), but it keeps sending as a ".zip" file instead of importing into the chat history

Suberbia commented 2 months ago

It seems like the issue might be related to how Telegram is handling the file. As a next step, try exporting another chat as a .json file and follow the same process. Additionally, create a test group on Telegram with no participants and try importing the chat into that group. This might help determine if the issue is with the file or the specific chat. Let me know how it goes!

pavelgz commented 2 months ago

I think, there were some changes in whatsapp export naming (and telegram import takes them into account).

You need to rename the resulting _chat.txt into "WhatsApp Chat with <user display name>.txt", before packing it. Pack it and rename the archive into "WhatsApp Chat with <user display name>.zip" as well. After that, my archive was finally recognized by telegram as history (telegram explicitly shows "choose dialog to import" instead of common share file) and imported correctly.

@Suberbia Thanks for a really useful tool!