From 82a0708b4eed2d34d04c09a7e558fdad0b0eec57 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 22 Apr 2025 15:19:51 +0100 Subject: [PATCH] SDK: rename confusing-named `Room::query_keys_for_untracked_users` This also sends out the query for dirty users, so the name was misleading. --- crates/matrix-sdk/src/room/futures.rs | 2 +- crates/matrix-sdk/src/room/mod.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/matrix-sdk/src/room/futures.rs b/crates/matrix-sdk/src/room/futures.rs index 77a030fbd..d8e2ea8c6 100644 --- a/crates/matrix-sdk/src/room/futures.rs +++ b/crates/matrix-sdk/src/room/futures.rs @@ -199,7 +199,7 @@ impl<'a> IntoFuture for SendRawMessageLikeEvent<'a> { // Note we do it all the time, because we might have sync'd members before // sending a message (so didn't enter the above branch), but // could have not query their keys ever. - room.query_keys_for_untracked_users().await?; + room.query_keys_for_untracked_or_dirty_users().await?; room.preshare_room_key().await?; diff --git a/crates/matrix-sdk/src/room/mod.rs b/crates/matrix-sdk/src/room/mod.rs index f97f4952d..ed94c8a26 100644 --- a/crates/matrix-sdk/src/room/mod.rs +++ b/crates/matrix-sdk/src/room/mod.rs @@ -1911,9 +1911,10 @@ impl Room { SendMessageLikeEvent::new(self, content) } - /// Run /keys/query requests for all the non-tracked users. + /// Run /keys/query requests for all the non-tracked users, and for users + /// with an out-of-date device list. #[cfg(feature = "e2e-encryption")] - async fn query_keys_for_untracked_users(&self) -> Result<()> { + async fn query_keys_for_untracked_or_dirty_users(&self) -> Result<()> { let olm = self.client.olm_machine().await; let olm = olm.as_ref().expect("Olm machine wasn't started");