diff options
author | Timo Kösters <timo@koesters.xyz> | 2023-08-10 17:01:56 +0000 |
---|---|---|
committer | Timo Kösters <timo@koesters.xyz> | 2023-08-10 17:01:56 +0000 |
commit | 0c2cfda3ae923d9e922d5edf379e4d8976a52d4e (patch) | |
tree | a8a8ecddf12f8ea183fc8f9948d8483648b9e187 /src/service/rooms/lazy_loading/mod.rs | |
parent | 53f14a2c4c216b529cc63137d8704573197aed19 (diff) | |
parent | 4bf8ee1f7481a222efe87235fa400f6cd14ebd11 (diff) | |
download | conduit-0c2cfda3ae923d9e922d5edf379e4d8976a52d4e.zip |
Merge branch 'next' into 'master'v0.6.0
Merge remote-tracking branch 'origin/next'
See merge request famedly/conduit!538
Diffstat (limited to 'src/service/rooms/lazy_loading/mod.rs')
-rw-r--r-- | src/service/rooms/lazy_loading/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/service/rooms/lazy_loading/mod.rs b/src/service/rooms/lazy_loading/mod.rs index 701a734..e6e4f89 100644 --- a/src/service/rooms/lazy_loading/mod.rs +++ b/src/service/rooms/lazy_loading/mod.rs @@ -9,11 +9,13 @@ use ruma::{DeviceId, OwnedDeviceId, OwnedRoomId, OwnedUserId, RoomId, UserId}; use crate::Result; +use super::timeline::PduCount; + pub struct Service { pub db: &'static dyn Data, pub lazy_load_waiting: - Mutex<HashMap<(OwnedUserId, OwnedDeviceId, OwnedRoomId, u64), HashSet<OwnedUserId>>>, + Mutex<HashMap<(OwnedUserId, OwnedDeviceId, OwnedRoomId, PduCount), HashSet<OwnedUserId>>>, } impl Service { @@ -36,7 +38,7 @@ impl Service { device_id: &DeviceId, room_id: &RoomId, lazy_load: HashSet<OwnedUserId>, - count: u64, + count: PduCount, ) { self.lazy_load_waiting.lock().unwrap().insert( ( @@ -55,7 +57,7 @@ impl Service { user_id: &UserId, device_id: &DeviceId, room_id: &RoomId, - since: u64, + since: PduCount, ) -> Result<()> { if let Some(user_ids) = self.lazy_load_waiting.lock().unwrap().remove(&( user_id.to_owned(), |