From 6021cb0a1fa5134341ce8a23b342e80332620918 Mon Sep 17 00:00:00 2001 From: strawberry Date: Mon, 29 Apr 2024 17:53:19 -0400 Subject: [PATCH] partially revert this Signed-off-by: strawberry --- src/api/client_server/keys.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/client_server/keys.rs b/src/api/client_server/keys.rs index b30a91eb..00ab426b 100644 --- a/src/api/client_server/keys.rs +++ b/src/api/client_server/keys.rs @@ -258,6 +258,8 @@ pub(crate) async fn get_keys_helper bool>( let mut get_over_federation = HashMap::new(); for (user_id, device_ids) in device_keys_input { + let user_id: &UserId = user_id; + if !user_is_local(user_id) { get_over_federation .entry(user_id.server_name()) @@ -316,7 +318,7 @@ pub(crate) async fn get_keys_helper bool>( { self_signing_keys.insert(user_id.to_owned(), self_signing_key); } - if user_id == sender_user.expect("user is authenticated") { + if Some(user_id) == sender_user { if let Some(user_signing_key) = services().users.get_user_signing_key(user_id)? { user_signing_keys.insert(user_id.to_owned(), user_signing_key); }