partially revert this

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-29 17:53:19 -04:00 committed by June
parent 35114dde7d
commit 6021cb0a1f

View file

@ -258,6 +258,8 @@ pub(crate) async fn get_keys_helper<F: Fn(&UserId) -> 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<F: Fn(&UserId) -> 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);
}