-
Notifications
You must be signed in to change notification settings - Fork 252
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(utd_hook): Fix regression causing retry to report false late decrypt #4252
base: main
Are you sure you want to change the base?
Changes from 1 commit
78fa312
6fc6c2c
aef2efe
24ef084
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1064,16 +1064,22 @@ impl<P: RoomDataProvider> TimelineController<P> { | |
|
||
match decryptor.decrypt_event_impl(original_json).await { | ||
Ok(event) => { | ||
trace!( | ||
"Successfully decrypted event that previously failed to decrypt" | ||
); | ||
|
||
// Notify observers that we managed to eventually decrypt an event. | ||
if let Some(hook) = unable_to_decrypt_hook { | ||
hook.on_late_decrypt(&remote_event.event_id, *utd_cause).await; | ||
if let matrix_sdk::deserialized_responses::TimelineEventKind::UnableToDecrypt { utd_info, ..} = event.kind { | ||
info!("Failed to decrypt event after receiving room key: {:?}", utd_info.reason); | ||
None | ||
} else { | ||
trace!( | ||
kind = ?event.kind, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is probably a bit verbose? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not changed by this PR. Any other reason to remove it? is it spamming the RS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Contains most of the event's data that's not privacy-sensitive, so it will be spammy. This line can be reached multiple times for each undecrypted event that failed to re-decrypt again, so it will be super spammy, please remove it. |
||
"Successfully decrypted event that previously failed to decrypt" | ||
); | ||
|
||
// Notify observers that we managed to eventually decrypt an event. | ||
if let Some(hook) = unable_to_decrypt_hook { | ||
hook.on_late_decrypt(&remote_event.event_id, *utd_cause).await; | ||
} | ||
|
||
Some(event) | ||
} | ||
|
||
Some(event) | ||
} | ||
Err(e) => { | ||
info!("Failed to decrypt event after receiving room key: {e}"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use
use
, not the fully qualified name here