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

Retry decryption of UTD timeline items #1215

Merged
merged 7 commits into from Nov 18, 2022
Merged

Retry decryption of UTD timeline items #1215

merged 7 commits into from Nov 18, 2022

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Nov 17, 2022

No description provided.

@jplatte jplatte requested a review from poljar November 17, 2022 15:22
@jplatte jplatte mentioned this pull request Nov 17, 2022
29 tasks
@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Base: 74.57% // Head: 74.49% // Decreases project coverage by -0.07% ⚠️

Coverage data is based on head (b3c9e1b) compared to base (98600e4).
Patch coverage: 76.72% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1215      +/-   ##
==========================================
- Coverage   74.57%   74.49%   -0.08%     
==========================================
  Files         112      112              
  Lines       12800    12878      +78     
==========================================
+ Hits         9545     9594      +49     
- Misses       3255     3284      +29     
Impacted Files Coverage Δ
crates/matrix-sdk/src/room/timeline/mod.rs 69.09% <44.73%> (-13.63%) ⬇️
crates/matrix-sdk/src/room/timeline/event_item.rs 67.44% <75.00%> (+0.36%) ⬆️
...ates/matrix-sdk/src/room/timeline/event_handler.rs 75.09% <87.17%> (+1.87%) ⬆️
crates/matrix-sdk-crypto/src/identities/manager.rs 66.38% <0.00%> (-0.85%) ⬇️
crates/matrix-sdk-crypto/src/machine.rs 67.86% <0.00%> (+0.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Looks good, your call if you want to add the retry on import right away.

// Not using room.add_event_handler here because RoomKey events are
// to-device events that are not received in the context of a room.
let room_id = room.room_id().to_owned();
let room_key_handle = room.client.add_event_handler({
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing to note here, this is not the only source of room keys. As your test shows there's at least one other source.

In total we have three sources:

  1. Receive them over to-device
  2. Manually import them from a file
  3. Import them from a backup

Your tests is using no. 2, no. 3 is another variant of 2 but not yet implemented.

I'm fine with opening an issue for this and linking to it, though adding some way for the RoomKeyImportResult to trigger a retry_event_decryption() call shouldn't be terribly complex either.

@jplatte jplatte merged commit 6b36312 into main Nov 18, 2022
@jplatte jplatte deleted the jplatte/retry-decrypt branch November 18, 2022 12:39
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.

None yet

2 participants