test(timeline): get rid of custom handle_live_event

This is `TimelineInner::add_events_at` with fixed parameters.
This commit is contained in:
Benjamin Bouvier
2024-07-09 18:47:21 +02:00
parent 3294a6c83a
commit 5a04f5b66a
2 changed files with 1 additions and 15 deletions

View File

@@ -626,20 +626,6 @@ impl<P: RoomDataProvider> TimelineInner<P> {
state.handle_ephemeral_events(events, &self.room_data_provider).await;
}
#[cfg(test)]
pub(super) async fn handle_live_event(&self, event: SyncTimelineEvent) {
let mut state = self.state.write().await;
state
.add_remote_events_at(
vec![event],
TimelineEnd::Back,
RemoteEventOrigin::Sync,
&self.room_data_provider,
&self.settings,
)
.await;
}
/// Creates the local echo for an event we're sending.
#[instrument(skip_all)]
pub(super) async fn handle_local_event(

View File

@@ -226,7 +226,7 @@ impl TestTimeline {
async fn handle_live_event(&self, event: Raw<AnySyncTimelineEvent>) {
let event = SyncTimelineEvent::new(event);
self.inner.handle_live_event(event).await
self.inner.add_events_at(vec![event], TimelineEnd::Back, RemoteEventOrigin::Sync).await;
}
async fn handle_local_event(&self, content: AnyMessageLikeEventContent) -> OwnedTransactionId {