Fix verification loss; workaround Nheko-Reborn/nheko#1908 (closes #146)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-11-03 04:43:49 +00:00 committed by timedout
parent 6c5d658ef2
commit 79a278b9e8
No known key found for this signature in database
GPG key ID: 0FA334385D0B689F

View file

@ -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,