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

Fix storing messages #111

Merged
merged 1 commit into from
Mar 6, 2023
Merged

Fix storing messages #111

merged 1 commit into from
Mar 6, 2023

Conversation

Schmiddiii
Copy link
Contributor

Currently, message timestamps are encrypted when storing. This does not work when retrieving messages before a timestamp (and I think currently does not work when getting/deleting messages in general). This PR fixes this by just removing the encryption.

Before this PR should actually be merged, it should maybe be discussed if removing the encryption is actually a good thing to do, but as far as I see it is the only thing possible except for every time we look for messages of a thread, decrypt all message keys and manually sort and iterate them.

Currently, message timestamps are encrypted when storing. This does not
work when retrieving messages before a timestamp (and I think currently
does not work when getting/deleting messages in general). This PR fixes
this by just removing the encryption.

Before this PR should actually be merged, it should maybe be discussed
if removing the encryption is actually a good thing to do, but as far as
I see it is the only thing possible except for every time we look for
messages of a thread, decrypt all message keys and manually sort and
iterate them.
@gferon gferon self-requested a review March 6, 2023 07:06
Copy link
Collaborator

@gferon gferon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was quite the oversight, I did this mechanically when implementing store encryption and didn't use it in my clients. I'll add some tests soon. Thanks for fixing it!

@gferon gferon merged commit f65ac19 into whisperfish:main Mar 6, 2023
@gferon gferon added this to the 0.5.0 milestone Mar 19, 2023
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

Successfully merging this pull request may close these issues.

2 participants