fix: make backfilled events reachable
This commit is contained in:
@@ -7,7 +7,6 @@ use crate::{PduEvent, Result};
|
||||
use super::PduCount;
|
||||
|
||||
pub trait Data: Send + Sync {
|
||||
fn first_pdu_in_room(&self, room_id: &RoomId) -> Result<Option<Arc<PduEvent>>>;
|
||||
fn last_timeline_count(&self, sender_user: &UserId, room_id: &RoomId) -> Result<PduCount>;
|
||||
|
||||
/// Returns the `count` of this pdu's id.
|
||||
|
||||
@@ -114,7 +114,10 @@ pub struct Service {
|
||||
impl Service {
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub fn first_pdu_in_room(&self, room_id: &RoomId) -> Result<Option<Arc<PduEvent>>> {
|
||||
self.db.first_pdu_in_room(room_id)
|
||||
self.all_pdus(&user_id!("@doesntmatter:conduit.rs"), &room_id)?
|
||||
.next()
|
||||
.map(|o| o.map(|(_, p)| Arc::new(p)))
|
||||
.transpose()
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self))]
|
||||
|
||||
Reference in New Issue
Block a user