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

Issues exporting Group chats/messages from Signal #8

Open
SignalSucks opened this issue Nov 2, 2022 · 4 comments
Open

Issues exporting Group chats/messages from Signal #8

SignalSucks opened this issue Nov 2, 2022 · 4 comments

Comments

@SignalSucks
Copy link

Hello, thanks for posting this tool, it worked for me for migrating all my chats out of signal. However, I have one group chat in Signal that did not convert and migrate out of signal. It has about 28K messages on it. The tool simply said error converting and ignored the long conversation.

Please let me know if you need any logs

@alexlance
Copy link
Owner

Was there anything in the log output about it? The thing that sometimes seems to happen is that there is a member of the group who is no longer a contact on your phone. So it has trouble creating the group.

You could maybe edit the python code to not catch the exeception (i.e. just let the error explode and halt the script) and then paste the entire stack trace when it exits.

@SignalSucks
Copy link
Author

SignalSucks commented Nov 6, 2022 via email

@alexlance
Copy link
Owner

alexlance commented Nov 6, 2022

Ok there's a function in the python code called: xml_create_mms_part. If you delete it (it's on line 155) and replace it with this (careful with the indentation)

def xml_create_mms_part(root, row):
    part = root.createElement('part')
    part.setAttribute("seq", str(row['seq']))
    part.setAttribute("ct", str(row['ct']))
    part.setAttribute("name", str(row['name']))
    part.setAttribute("chset", str(row['chset']))
    part.setAttribute("cl", str(row['cl']))
    part.setAttribute("text", str(row['caption']))

    filename = f"bits/Attachment_{row['_id']}_{row['unique_id']}.bin"
    b = b"Media is missing"
    try:
        with open(filename, 'rb') as f:
            b = base64.b64encode(f.read())
    except FileNotFoundError:
        logging.error(f'File not found for media message: {filename} for part: {row}')

    base64_encoded_file_data = str(b.decode())
    part.setAttribute("data", base64_encoded_file_data)
    return part

It won't fix the problem - it sounds like the image attachment is gone - but it should let the rest of the message get imported...

@SignalSucks
Copy link
Author

SignalSucks commented Nov 6, 2022 via email

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