mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-09 08:27:32 -04:00
fix(crypto): Do a keys query before we accept historic room key bundles
This commit is contained in:
@@ -130,6 +130,15 @@ pub(crate) async fn maybe_accept_key_bundle(room: &Room, inviter: &UserId) -> Re
|
||||
|
||||
tracing::Span::current().record("bundle_sender", bundle_info.sender_user.as_str());
|
||||
|
||||
// Ensure that we get a fresh list of devices for the inviter, in case we need
|
||||
// to recalculate the `SenderData`.
|
||||
let (req_id, request) =
|
||||
olm_machine.query_keys_for_users(iter::once(bundle_info.sender_user.as_ref()));
|
||||
|
||||
if !request.device_keys.is_empty() {
|
||||
room.client.keys_query(&req_id, request.device_keys).await?;
|
||||
}
|
||||
|
||||
let bundle_content = client
|
||||
.media()
|
||||
.get_media_content(
|
||||
|
||||
Reference in New Issue
Block a user