lazy-construct presence; avoids useless db queries in sender and syncer.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-16 02:00:54 -07:00 committed by June
parent 8b003e6be2
commit 33cc3d56c1
5 changed files with 16 additions and 11 deletions

View file

@ -17,5 +17,5 @@ pub trait Data: Send + Sync {
/// Returns the most recent presence updates that happened after the event
/// with id `since`.
fn presence_since<'a>(&'a self, since: u64) -> Box<dyn Iterator<Item = (OwnedUserId, u64, PresenceEvent)> + 'a>;
fn presence_since<'a>(&'a self, since: u64) -> Box<dyn Iterator<Item = (OwnedUserId, u64, Vec<u8>)> + 'a>;
}