carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
446 stars 47 forks source link

Fix renaming of chats #30

Closed adam-sroka closed 2 years ago

adam-sroka commented 2 years ago

This PR attempts to fix Issue #29.

I have modified the fix_names function to convert emojis into text before stripping all alphanumberic characters. This is done via an external dependency, the emoji library. Let me know if you prefer some other approach, perhaps it is just me who has lots of emojis in chat names 🤷‍♂️.

The other changes are changing empty string names to unnamed and appending a number to a chat if another chat with the same name already exists.

Thank you 😊!

carderne commented 2 years ago

Thanks this looks good. Happy to incorporate the emoji library I think, look lightweight and I've been wanting to add the message 'reactions' to the export somehow.

Will give this a proper look in the next day or two but should be fine.

Only note, please black format the code (spotted some single quotes).

adam-sroka commented 2 years ago

Great, formatting done, let me know if the logic (or anything else!) needs changes. black

carderne commented 2 years ago

Thanks @adam-sroka!