chore: upgrade ruma

This commit is contained in:
Matthias Ahouansou
2025-02-23 05:35:28 +00:00
parent 406367b4f2
commit 2a7aa6242f
14 changed files with 143 additions and 144 deletions

View File

@@ -4,8 +4,8 @@ use ruma::{
encryption::{CrossSigningKey, DeviceKeys, OneTimeKey},
events::AnyToDeviceEvent,
serde::Raw,
DeviceId, DeviceKeyAlgorithm, DeviceKeyId, OwnedDeviceId, OwnedDeviceKeyId, OwnedMxcUri,
OwnedUserId, UInt, UserId,
DeviceId, OneTimeKeyAlgorithm, OwnedDeviceId, OwnedMxcUri, OwnedOneTimeKeyId, OwnedUserId,
UInt, UserId,
};
use std::collections::BTreeMap;
@@ -79,7 +79,7 @@ pub trait Data: Send + Sync {
&self,
user_id: &UserId,
device_id: &DeviceId,
one_time_key_key: &DeviceKeyId,
one_time_key_key: &OwnedOneTimeKeyId,
one_time_key_value: &Raw<OneTimeKey>,
) -> Result<()>;
@@ -89,14 +89,14 @@ pub trait Data: Send + Sync {
&self,
user_id: &UserId,
device_id: &DeviceId,
key_algorithm: &DeviceKeyAlgorithm,
) -> Result<Option<(OwnedDeviceKeyId, Raw<OneTimeKey>)>>;
key_algorithm: &OneTimeKeyAlgorithm,
) -> Result<Option<(OwnedOneTimeKeyId, Raw<OneTimeKey>)>>;
fn count_one_time_keys(
&self,
user_id: &UserId,
device_id: &DeviceId,
) -> Result<BTreeMap<DeviceKeyAlgorithm, UInt>>;
) -> Result<BTreeMap<OneTimeKeyAlgorithm, UInt>>;
fn add_device_keys(
&self,

View File

@@ -18,8 +18,8 @@ use ruma::{
encryption::{CrossSigningKey, DeviceKeys, OneTimeKey},
events::AnyToDeviceEvent,
serde::Raw,
DeviceId, DeviceKeyAlgorithm, DeviceKeyId, OwnedDeviceId, OwnedDeviceKeyId, OwnedMxcUri,
OwnedRoomId, OwnedUserId, UInt, UserId,
DeviceId, OneTimeKeyAlgorithm, OwnedDeviceId, OwnedMxcUri, OwnedOneTimeKeyId, OwnedRoomId,
OwnedUserId, UInt, UserId,
};
use crate::{services, Error, Result};
@@ -373,7 +373,7 @@ impl Service {
&self,
user_id: &UserId,
device_id: &DeviceId,
one_time_key_key: &DeviceKeyId,
one_time_key_key: &OwnedOneTimeKeyId,
one_time_key_value: &Raw<OneTimeKey>,
) -> Result<()> {
self.db
@@ -388,8 +388,8 @@ impl Service {
&self,
user_id: &UserId,
device_id: &DeviceId,
key_algorithm: &DeviceKeyAlgorithm,
) -> Result<Option<(OwnedDeviceKeyId, Raw<OneTimeKey>)>> {
key_algorithm: &OneTimeKeyAlgorithm,
) -> Result<Option<(OwnedOneTimeKeyId, Raw<OneTimeKey>)>> {
self.db.take_one_time_key(user_id, device_id, key_algorithm)
}
@@ -397,7 +397,7 @@ impl Service {
&self,
user_id: &UserId,
device_id: &DeviceId,
) -> Result<BTreeMap<DeviceKeyAlgorithm, UInt>> {
) -> Result<BTreeMap<OneTimeKeyAlgorithm, UInt>> {
self.db.count_one_time_keys(user_id, device_id)
}