Don't send empty SecretRequest cancellation if there are only 2 devices

This commit is contained in:
Nicolas Werner 2025-11-03 03:55:23 +01:00
parent 2769642d3c
commit 1bd2970c4d
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -398,6 +398,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey
body[local_user][dev] = secretRequest;
}
if (!body.empty()) {
http::client()->send_to_device<mtx::events::msg::SecretRequest>(
http::client()->generate_txn_id(),
body,
@ -409,6 +410,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey
secret_name);
}
});
}
nhlog::crypto()->info("Storing secret {}", secret_name);
cache::client()->storeSecret(secret_name, e->content.secret);