move lasttimelinecount_cache to service

This commit is contained in:
Charles Hall 2024-10-08 14:40:54 -07:00
parent 107f4521e0
commit ce7efc1eff
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 41 additions and 65 deletions

View file

@ -6,12 +6,6 @@ use super::PduCount;
use crate::{service::rooms::timeline::PduId, PduEvent, Result};
pub(crate) trait Data: Send + Sync {
fn last_timeline_count(
&self,
sender_user: &UserId,
room_id: &RoomId,
) -> Result<PduCount>;
/// Returns the `count` of this pdu's id.
fn get_pdu_count(&self, event_id: &EventId) -> Result<Option<PduCount>>;
@ -60,7 +54,6 @@ pub(crate) trait Data: Send + Sync {
pdu_id: &PduId,
pdu: &PduEvent,
json: &CanonicalJsonObject,
count: u64,
) -> Result<()>;
// Adds a new pdu to the backfilled timeline