syncv3: read receipts extension (MSC3960)

This commit is contained in:
morguldir 2024-08-30 18:23:42 +02:00
commit 9fde835673
No known key found for this signature in database
GPG key ID: 5A6025D4F6E7A8A3
3 changed files with 60 additions and 16 deletions

View file

@ -2,17 +2,11 @@ use std::{mem::size_of, sync::Arc};
use conduit::{utils, Error, Result};
use database::Map;
use ruma::{
events::{receipt::ReceiptEvent, AnySyncEphemeralRoomEvent},
serde::Raw,
CanonicalJsonObject, OwnedUserId, RoomId, UserId,
};
use ruma::{events::receipt::ReceiptEvent, serde::Raw, CanonicalJsonObject, RoomId, UserId};
use super::AnySyncEphemeralRoomEventIter;
use crate::{globals, Dep};
type AnySyncEphemeralRoomEventIter<'a> =
Box<dyn Iterator<Item = Result<(OwnedUserId, u64, Raw<AnySyncEphemeralRoomEvent>)>> + 'a>;
pub(super) struct Data {
roomuserid_privateread: Arc<Map>,
roomuserid_lastprivatereadupdate: Arc<Map>,