mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-06-27 16:35:59 +00:00
fix(key_value): return a map of algorithms instead of key ids for count_one_time_keys
this regession was introduced in 2a7aa6242f
This commit is contained in:
parent
17f56081ce
commit
45861f8e4a
1 changed files with 2 additions and 1 deletions
|
@ -406,11 +406,12 @@ impl service::users::Data for KeyValueDatabase {
|
|||
self.onetimekeyid_onetimekeys
|
||||
.scan_prefix(userdeviceid)
|
||||
.map(|(bytes, _)| {
|
||||
serde_json::from_slice::<OneTimeKeyAlgorithm>(
|
||||
serde_json::from_slice::<OwnedOneTimeKeyId>(
|
||||
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."))
|
||||
})
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue