summaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorJonas Platte <jplatte+git@posteo.de>2022-12-14 13:09:10 +0100
committerJonas Platte <jplatte+git@posteo.de>2022-12-16 11:57:32 +0100
commitd39ce1401d773a0b68515b8ae1a434f37abfc650 (patch)
tree44350155e1e5e3383d686cae91627ddffd141d2d /src/database
parent7fd5b22e3b03cd6f10bb40b1dda05a3815ee25b2 (diff)
downloadconduit-d39ce1401d773a0b68515b8ae1a434f37abfc650.zip
WIP: Upgrade Ruma
Diffstat (limited to 'src/database')
-rw-r--r--src/database/key_value/users.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/database/key_value/users.rs b/src/database/key_value/users.rs
index cd5a535..1cabab0 100644
--- a/src/database/key_value/users.rs
+++ b/src/database/key_value/users.rs
@@ -1,7 +1,7 @@
use std::{collections::BTreeMap, mem::size_of};
use ruma::{
- api::client::{device::Device, error::ErrorKind, filter::IncomingFilterDefinition},
+ api::client::{device::Device, error::ErrorKind, filter::FilterDefinition},
encryption::{CrossSigningKey, DeviceKeys, OneTimeKey},
events::{AnyToDeviceEvent, StateEventType},
serde::Raw,
@@ -899,7 +899,7 @@ impl service::users::Data for KeyValueDatabase {
}
/// Creates a new sync filter. Returns the filter id.
- fn create_filter(&self, user_id: &UserId, filter: &IncomingFilterDefinition) -> Result<String> {
+ fn create_filter(&self, user_id: &UserId, filter: &FilterDefinition) -> Result<String> {
let filter_id = utils::random_string(4);
let mut key = user_id.as_bytes().to_vec();
@@ -914,11 +914,7 @@ impl service::users::Data for KeyValueDatabase {
Ok(filter_id)
}
- fn get_filter(
- &self,
- user_id: &UserId,
- filter_id: &str,
- ) -> Result<Option<IncomingFilterDefinition>> {
+ fn get_filter(&self, user_id: &UserId, filter_id: &str) -> Result<Option<FilterDefinition>> {
let mut key = user_id.as_bytes().to_vec();
key.push(0xff);
key.extend_from_slice(filter_id.as_bytes());