From 45861f8e4a4ef3c3d7f1cbef54f7315056225486 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Sun, 11 May 2025 12:27:08 +0100 Subject: [PATCH 1/2] fix(key_value): return a map of algorithms instead of key ids for count_one_time_keys this regession was introduced in 2a7aa6242f7ae3132982fbae8b9ddb77cba1e147 --- src/database/key_value/users.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/database/key_value/users.rs b/src/database/key_value/users.rs index e28f28b1..47c79d2e 100644 --- a/src/database/key_value/users.rs +++ b/src/database/key_value/users.rs @@ -406,11 +406,12 @@ impl service::users::Data for KeyValueDatabase { self.onetimekeyid_onetimekeys .scan_prefix(userdeviceid) .map(|(bytes, _)| { - serde_json::from_slice::( + serde_json::from_slice::( bytes.rsplit(|&b| b == 0xff).next().ok_or_else(|| { Error::bad_database("OneTimeKey ID in db is invalid.") })?, ) + .map(|key_id| key_id.algorithm()) .map_err(|_| Error::bad_database("DeviceKeyId in db is invalid.")) }) { From a5a8f6c3c179166bd9cae4fd574499381ea72400 Mon Sep 17 00:00:00 2001 From: Matthias Ahouansou Date: Sun, 11 May 2025 12:31:29 +0100 Subject: [PATCH 2/2] chore(release): 0.10.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30a446be..a0b031ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -460,7 +460,7 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "conduit" -version = "0.10.1" +version = "0.10.2" dependencies = [ "async-trait", "axum", diff --git a/Cargo.toml b/Cargo.toml index 2f0e7351..52c63d91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ license = "Apache-2.0" name = "conduit" readme = "README.md" repository = "https://gitlab.com/famedly/conduit" -version = "0.10.1" +version = "0.10.2" # See also `rust-toolchain.toml` rust-version = "1.83.0"