Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing WhatsApp group chats without their participants #49

Open
Terrance opened this issue Apr 19, 2022 · 6 comments
Open

Importing WhatsApp group chats without their participants #49

Terrance opened this issue Apr 19, 2022 · 6 comments

Comments

@Terrance
Copy link

(I'm not sure if this is the right place to ask as the WhatsApp import stuff appears to be across two other forks, but it's present in the build from this repo so is presumably being maintained in some capacity here.)

I've got a handful of WhatsApp groups who have since moved to platforms other than WhatsApp and Signal, but I'd like to keep a copy of the message history in Signal. I created empty groups matching the names of these groups, and the import option correctly matches them up, but only my own messages are imported -- presumably this is because the other participants are not in the group. Is there a way to get their past messages imported too, without adding them to my copy of the Signal chats?

@johanw666
Copy link
Owner

johanw666 commented May 11, 2022

I didn't write that code so I'd have to look at that, but I will have to have it updated anyway now that WhatsApp introduced reactions too.

@Terrance
Copy link
Author

Terrance commented Mar 1, 2024

Did this get anywhere by the way? I recently had to crack open my backup WhatsApp database in order to find a message from an old group chat, so I'd still be interested in importing these to Signal.

At a guess, it's to do with the recipient resolution here:

Recipient threadRecipient = Recipient.resolved(threadRecipientId);

From digging a few layers deeper, I can't see it trying to create new recipients during group import, only resolve existing ones.

@johanw666
Copy link
Owner

I can take a look but to be honest I have no time to maintain this import function at the moment. It could very well not work due to a changed WhatsApp database structure.

@Terrance
Copy link
Author

Terrance commented Mar 1, 2024

Would supporting the import of plain-text chat backups be a better option? I grabbed copies of those too, and I've seen other apps (e.g. Telegram) use them for migrating messages around too.

The directory structure is a folder per chat, named after the recipient or group, with attachments and the chat log inside:

First Last/
    IMG-20240229-WA0000.jpg
    IMG-20240229-WA0001.jpg
    WhatsApp Chat with +44 7766 543210.txt
Group Name/
    WhatsApp Chat with Group Name.txt

The chat log itself looks like this:

29/02/2024, 12:33 - Your security code with +44 7766 543210 changed. Tap to learn more.
29/02/2024, 12:34 - My Name: Outgoing message
29/02/2024, 12:35 - +44 7766 543210: Incoming message
With multple lines
29/02/2024, 12:36 - ​My Name: IMG-20240229-WA0000.jpg (file attached)
29/02/2024, 12:37 - +44 7766 543210: <Media omitted>
29/02/2024, 12:38 - ​My Name: IMG-20240229-WA00001.jpg (file attached)
Caption for attachment

@johanw666
Copy link
Owner

johanw666 commented Mar 1, 2024

I think it would be easier to convert that to xml and use the existing plaintext import. But that won't work for groups, you would get the messages in a 1-1 conversation and not the group structure.

@Terrance
Copy link
Author

Terrance commented Mar 1, 2024

It also wouldn't include media, which is more pressing as there's a lot of attachments that ideally I'd keep associated with their chats. Between this and a couple of chats from another app (one that provides its own backup format that I intend to massage into something suitable for Signal), it seems like the WA database is still the way to go, but groups without the message authors as members can't currently be imported in any of the flows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants