From 79a278b9e82f738bbadbd9d161f44e3ef52e20a1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 3 Nov 2025 04:43:49 +0000 Subject: [PATCH] Fix verification loss; workaround Nheko-Reborn/nheko#1908 (closes #146) Signed-off-by: Jason Volk --- src/api/client/keys.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/client/keys.rs b/src/api/client/keys.rs index e462979b..7115a84d 100644 --- a/src/api/client/keys.rs +++ b/src/api/client/keys.rs @@ -91,8 +91,11 @@ pub(crate) async fn upload_keys_route( .users .get_device_keys(sender_user, sender_device) .await + .and_then(|keys| keys.deserialize().map_err(Into::into)) { - if existing_keys.json().get() == device_keys.json().get() { + // NOTE: also serves as a workaround for a nheko bug which omits cross-signing + // NOTE: signatures when re-uploading the same DeviceKeys. + if existing_keys.keys == deser_device_keys.keys { debug!( %sender_user, %sender_device,