Skip to content

Commit d800d3c

Browse files
authored
crypto: clean up confusing method (#4983)
This method had a confusing name: it didn't receive a key bundle, but rather the data *about* a key bundle. Remove the unused `sender_key` parameter while we are at it: we use the embedded (and already-checked) `event.sender_device_keys` here.
1 parent 7c84ab2 commit d800d3c

File tree

1 file changed

+4
-3
lines changed
  • crates/matrix-sdk-crypto/src/machine

1 file changed

+4
-3
lines changed

crates/matrix-sdk-crypto/src/machine/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -939,10 +939,11 @@ impl OlmMachine {
939939
}
940940
}
941941

942+
/// Handle a received, decrypted, `io.element.msc4268.room_key_bundle`
943+
/// to-device event.
942944
#[instrument()]
943-
async fn receive_room_key_bundle(
945+
async fn receive_room_key_bundle_data(
944946
&self,
945-
sender_key: Curve25519PublicKey,
946947
event: &DecryptedRoomKeyBundleEvent,
947948
changes: &mut Changes,
948949
) -> OlmResult<()> {
@@ -1206,7 +1207,7 @@ impl OlmMachine {
12061207
}
12071208
AnyDecryptedOlmEvent::RoomKeyBundle(e) => {
12081209
debug!("Received a room key bundle event {:?}", e);
1209-
self.receive_room_key_bundle(decrypted.result.sender_key, e, changes).await?;
1210+
self.receive_room_key_bundle_data(e, changes).await?;
12101211
}
12111212
AnyDecryptedOlmEvent::Custom(_) => {
12121213
warn!("Received an unexpected encrypted to-device event");

0 commit comments

Comments
 (0)